/Users/lyon/j4p/src/ip/gui/dialog/DoLog.java

1    package ip.gui.dialog; 
2     
3    import ip.gui.Doable; 
4     
5    import java.awt.*; 
6    import java.awt.event.ActionEvent; 
7     
8    public class DoLog extends DoubleLog { 
9        private Doable doAble; 
10    
11       public DoLog( 
12               Doable d, 
13               String title, 
14               String prompts[], 
15               String defaults[], 
16               int fieldSize) { 
17           super(new Frame(), title, prompts, defaults, fieldSize); 
18           doAble = d; 
19           setButton.addActionListener(this); 
20           cancelButton.addActionListener(this); 
21       } 
22    
23       public void actionPerformed(ActionEvent e) { 
24           if (e.getSource() == setButton) { 
25               doAble.doit(getUserInputAsDouble()); 
26               return; 
27           } 
28           super.actionPerformed(e); 
29       } 
30    
31   } 
32