1: //TestGUISwing1.java 2: //Just create and show a JFrame. 3: //Size is the default obtained by calling pack(). 5: import java.awt.*; 6: import javax.swing.*; 8: public class TestGUISwing1 9: { 10: public static void main(String[] args) 11: { 12: JFrame frame = new JFrame("My JFrame"); 13: frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 15: frame.pack(); 16: frame.show(); 17: } 18: }