/Users/lyon/j4p/src/classUtils/gui/RunPropertyTextField.java

1    package classUtils.gui; 
2     
3    import javax.swing.*; 
4    import java.awt.event.ActionEvent; 
5    import java.awt.event.ActionListener; 
6     
7    abstract class RunPropertyTextField extends JTextField implements Runnable, ActionListener { 
8        int location; 
9        Class type; 
10    
11       public RunPropertyTextField(String label, int x, Class type_) { 
12           super(label); 
13           addActionListener(this); 
14           location = x; 
15           type = type_; 
16       } 
17    
18       public void actionPerformed(ActionEvent e) { 
19           run(); 
20       } 
21   } 
22