Code example for WindowEvent

Methods: getIDgetWindow

0
  boolean isDuplicateDispose(AWTEvent event) {
    if (!(event instanceof WindowEvent)) {
      return false; 
    } 
    WindowEvent windowEvent = (WindowEvent) event;
    int eventId = windowEvent.getID();
    if (eventId == WINDOW_CLOSING) {
      return false; 
    } 
    if (eventId == WINDOW_CLOSED) {
      Window w = windowEvent.getWindow();
      if (disposedWindows.containsKey(w)) {
        return true; 
      } 
      disposedWindows.put(w, true);
      // execute(addComponentListenerTask(w, new DisposalMonitor(disposedWindows))); 
      w.addComponentListener(new DisposalMonitor(disposedWindows));
      return false; 
    } 
    disposedWindows.remove(windowEvent.getWindow());
    return false; 
  } 
}