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

1    package classUtils.gui; 
2     
3    import gui.mouse.MouseComponentMover; 
4     
5    import javax.swing.*; 
6    import java.awt.event.ActionEvent; 
7    import java.awt.event.ActionListener; 
8     
9     
10   abstract class RunButton extends JButton implements Runnable, ActionListener { 
11       public RunButton(String label) { 
12           super(label); 
13           this.setSize(100, 40); 
14           new MouseComponentMover(this); 
15           addActionListener(this); 
16       } 
17    
18       public void actionPerformed(ActionEvent e) { 
19           run(); 
20       } 
21   } 
22