if (windowListener != null)
int id = evt.getID();  if (id == WindowEvent.WINDOW_GAINED_FOCUS || id == WindowEvent.WINDOW_LOST_FOCUS) processWindowFocusEvent (evt); else if (id == WindowEvent.WINDOW_STATE_CHANGED) processWindowStateEvent (evt); else
  protected void processWindowEvent(WindowEvent evt)  {    if (windowListener != null)      {        switch (evt.getID())          {          case WindowEvent.WINDOW_ACTIVATED:            windowListener.windowActivated(evt);            break;          case WindowEvent.WINDOW_CLOSED:            windowListener.windowClosed(evt);            break;          case WindowEvent.WINDOW_CLOSING:            windowListener.windowClosing(evt);            break;          case WindowEvent.WINDOW_DEACTIVATED:            windowListener.windowDeactivated(evt);            break;          case WindowEvent.WINDOW_DEICONIFIED:            windowListener.windowDeiconified(evt);            break;          case WindowEvent.WINDOW_ICONIFIED:            windowListener.windowIconified(evt);            break;          case WindowEvent.WINDOW_OPENED:            windowListener.windowOpened(evt);            break;          case WindowEvent.WINDOW_GAINED_FOCUS:          case WindowEvent.WINDOW_LOST_FOCUS:            processWindowFocusEvent (evt);            break;          case WindowEvent.WINDOW_STATE_CHANGED:            processWindowStateEvent (evt);            break;          }      }  }