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

protected void processWindowEvent ( WindowEvent e ) { if ( e . getID ( ) == WindowEvent . WINDOW_CLOSING ) dispose ( ) ; super . processWindowEvent ( e ) ; }
close dialog if closing
