PPT Slide
Swing allows us to globally toggle the activation status of event handlers through methods in the Action interface.
A convenient implementation technique is to merely subclass javax.swing.AbstractAction, which merely requires us to override
actionPerformed(ActionEvent e)
to obtain the desired behavior.
public class MyAction extends AbstractAction {
public void actionPerformed(ActionEvent e){