i have the following class:
public class ExitAction extends AbstractAction {
public ExitAction() {
putValue(Action.NAME, "Exit);
putValue(Action.ACCELERATOR_KEY,
KeyStroke.getKeyStroke(KeyEvent.VK_F4,
ActionEvent.ALT_MASK));
putValue(Action.MNEMONIC_KEY, KeyEvent.VK_X);
....
....
}
public void actionPerformed(ActionEvent evt) {
....
....
}
}
is it better this way or is it redundant? should i just create a new
Action with these values rather than create a new ExitAction?