/Users/lyon/j4p/src/ip/gui/frames/ClosableFrame.java

1    package ip.gui.frames; 
2     
3    import gui.windowUtils.WindowController; 
4     
5    import java.awt.*; 
6    import java.io.Serializable; 
7     
8    public class ClosableFrame   
9            extends Frame implements Serializable { 
10   // constructor needed to pass 
11   // window title to class Frame 
12       public ClosableFrame(String name) { 
13           // call java.awt.Frame(String) constructor 
14           super(name); 
15           init(); 
16       } 
17    
18       public ClosableFrame() { 
19           init(); 
20       } 
21    
22       private void init() { 
23           setBackground(Color.white); 
24           new WindowController(this); 
25       } 
26    
27    
28       public static void main(String args[]) { 
29           ClosableFrame cf = new ClosableFrame("Closable Frame"); 
30           cf.setSize(200, 200); 
31           cf.show(); 
32       } 
33    
34   }