been working with the Beginning Java 2 (1.3 edition.)
page 629 working with the SketchFrame java file..
i don't understand how to create event handlers for when someone clicks on the menu and clicks on exit.. where do i define the exit button so when someone clicks on it, it closes the program..
Here's some of my code:
quitProgramAction = new FileAction("Quit Program",KeyStroke.getKeyStroke('Q', Event.CTRL_MASK));
private JMenuItem addMenuItem(JMenu menu, Action action)
JMenuItem item = menu.add(action);
KeyStroke keystroke = (KeyStroke)action.getValue(action.ACCELERATOR_KEY);
if(keystroke != null)
any help is greatly appreciated