/Users/lyon/j4p/src/classUtils/gui/RunMenuItem.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 RunMenuItem extends JMenuItem implements ActionListener, Runnable { 
8        public RunMenuItem(String label) { 
9            super(label); 
10           addActionListener(this); 
11       } 
12    
13       public void actionPerformed(ActionEvent e) { 
14           run(); 
15           ComponentEditor.desktop.updateUI(); 
16       } 
17   } 
18