final JMenuItem exit = new JMenuItem( "Exit", 'Q');
exit.setAccelerator(KeyStroke.getKeyStroke('Q',
Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
fileMenu.add(exit);
fileMenu.insertSeparator(2);
ActionListener menuListener = new ActionListener()
{
public void actionPerformed(ActionEvent event)