protected void processWindowEvent(WindowEvent e){
  super.processWindowEvent(e);
  if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    jMenuFileExit_actionPerformed(null);
  }
}

protected void processWindowEvent ( WindowEvent e ) { super . processWindowEvent ( e ) ; if ( e . getID ( ) == WindowEvent . WINDOW_CLOSING ) { jMenuFileExit_actionPerformed ( null ) ; } }
overridden so we can exit when window is closed
