import javax.swing.*; //This is necessary to use the JFrame class
/** Drawing a window. Not really Object-Oriented Programming, but to show you how to draw a window and
set its title and size.
*/
class SimpleFrameTest {
/** Constants for the window size. */
public static final int WIDTH=300;
public static final int HEIGHT=200;
public static void main(String[] args){
JFrame frame = new JFrame(); //create an Object of class JFrame, this is mainly a window.
frame.setSize(WIDTH,HEIGHT);
frame.setTitle("Hello World !");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //What to do when the window is closed. EXIT_ON_CLOSE is a static final field (a static constant) of the JFrame class.
frame.show(); //Now that it is ready you need to show the window.
}
}