posted 20 years ago
If you haven't already, take a look at Actions. These are very handy for providing menu/task bar functionality. They provide the ability to coordinate access to single functions through several paths, for example, a key press, a menu choice or a button click. They can be configured to have icons, which can appear beside the menu items they represent (when added to a menu) or in buttons in a task bar. They can be disabled or enabled, and, if the action is disabled, the menu item, task bar button and key press are ALL disabled in one go.
Easiest way to create them is as inner classes (either anonymous or named) that extend the abstract javax.swing.AbstractAction class.
Always proofread carefully to see if you any words out.