ExitAction

From: - (nobody_at_hoem.com)
Date: 02/24/05

  • Next message: Ryan Stewart: "Re: Need help getting started with program ....."
    Date: Thu, 24 Feb 2005 10:29:08 +0800
    
    

    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?


  • Next message: Ryan Stewart: "Re: Need help getting started with program ....."