/home/sjenks/NetBeansProjects/CS2/src/gui/GUI2.java
 1 /*
 2  * GUI2, like GUI1 is a program to create one lonely frame. GUI2, however, 
 3  * establishes a frame class with an eye towards subsequent development. 
 4  */
 5 package gui;
 6 
 7 import javax.swing.JFrame;
 8 import javax.swing.SwingUtilities;
 9 
10 /**
11  *
12  * @author sjenks
13  */
14 public class GUI2 {
15 
16     /**
17      * @param args the command line arguments
18      */
19     public static void main(String[] args) {
20       SwingUtilities.invokeLater(new ThreadForGUI());
21     }
22 
23     private static class ThreadForGUI implements Runnable {
24 
25         public ThreadForGUI() {
26         }
27 
28         @Override
29         public void run() {
30             GUI2 gui = new GUI2();
31         }
32     }
33 
34     public GUI2() {
35         KFrame frame = new KFrame("GUI 2");
36     }
37     
38     // modeling the featured frame of the GUI
39     private class KFrame extends JFrame{
40         public KFrame (String title){
41             super(title);
42             setSize(500,300);
43             setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
44             setVisible (true);
45         }
46     }
47 }
48 
49     
50     
51 
52