@Override protected void processWindowEvent(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { client.shutdown(); } super.processWindowEvent(e); }
@Override // 设置窗口显示模式 protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { switch (getDefaultCloseOperation()) { case HIDE_ON_CLOSE: setVisible(false); MainFrame.getMainFrame().cancelShowNear(); MainFrame.getMainFrame().cancelShowFocusNearPoint(); break; case DISPOSE_ON_CLOSE: dispose(); break; case DO_NOTHING_ON_CLOSE: default: break; case EXIT_ON_CLOSE: // This needs to match the checkExit call in // setDefaultCloseOperation System.exit(0); break; } } }
protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); int defaultCloseOperation = getDefaultCloseOperation(); if ((e.getID() == WindowEvent.WINDOW_CLOSING) && (defaultCloseOperation == EXIT_ON_CLOSE)) { System.exit(returnCode); } }
/* (non-Javadoc) * @see java.awt.Window#processWindowEvent(java.awt.event.WindowEvent) */ protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { // Fenster schliessen. this.setVisible(false); this.dispose(); } }
@Override /** Closing the application */ protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { System.exit(0); } }
protected void processWindowEvent(java.awt.event.WindowEvent e) { super.processWindowEvent(e); if (e.getID() != java.awt.event.WindowEvent.WINDOW_OPENED) //noinspection UnnecessaryReturnStatement return; GLFrame glFrame = new GLFrame(outputArea); glFrame.setVisible(true); }
protected void processWindowEvent(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { /* * 关闭当前窗体 如果省略此句,那么就禁用了关闭按钮 */ this.dispose(); } else { super.processWindowEvent(e); } }
@Override protected void processWindowEvent(final WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { if (!plugin) { dispose(); System.exit(0); } else { saveWindowState(); setVisible(false); } } else { super.processWindowEvent(e); } }
protected void processWindowEvent(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { if (panel.closeFile()) System.exit(0); } else super.processWindowEvent(e); }
protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == 201) { jMenuFileExit_actionPerformed(null); } }
/** Overridden so we can exit when window is closed */ protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { System.exit(0); } }