Displays a frame containing no other interface components - Java Swing

Java examples for Swing:JFrame

Description

Displays a frame containing no other interface components

Demo Code

import javax.swing.JFrame;

public class Main extends JFrame {
  public Main() {
    super("Frame Title");
    setSize(300, 100);/*from w w  w. j  ava  2 s.  c o m*/
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    setVisible(true);
  }

  public static void main(String[] arguments) {

    Main sf = new Main();
  }
}

Related Tutorials