/Users/lyon/j4p/src/ip/hak/ClosableDialog.java

1    package ip.hak; 
2     
3     
4    import java.awt.*; 
5    import java.awt.event.WindowEvent; 
6    import java.awt.event.WindowListener; 
7     
8     
9    public class ClosableDialog extends Dialog implements WindowListener { 
10    
11       public ClosableDialog(Frame parents) { 
12    
13           super(parents); 
14    
15           addWindowListener(this); 
16    
17       } 
18    
19    
20       public ClosableDialog(Frame parents, String Name) { 
21    
22           super(parents, Name); 
23    
24           addWindowListener(this); 
25    
26       } 
27    
28    
29       public ClosableDialog(Frame parents, String Name, boolean md) { 
30    
31           super(parents, Name, md); 
32    
33           addWindowListener(this); 
34    
35       } 
36    
37    
38       public void windowClosing(WindowEvent e) { 
39    
40           dispose(); 
41    
42       } 
43    
44    
45       public void windowOpened(WindowEvent e) { 
46       } 
47    
48    
49       public void windowClosed(WindowEvent e) { 
50       } 
51    
52    
53       public void windowIconified(WindowEvent e) { 
54       } 
55    
56    
57       public void windowDeiconified(WindowEvent e) { 
58       } 
59    
60    
61       public void windowActivated(WindowEvent e) { 
62       } 
63    
64    
65       public void windowDeactivated(WindowEvent e) { 
66       } 
67    
68   } 
69