protected void processWindowEvent(WindowEvent we) { if (we.getID() == we.WINDOW_CLOSING) { r = JOptionPane.showConfirmDialog(null, "WARNNING", "EXIT", JOptionPane.WARNING_MESSAGE); if (r == JOptionPane.YES_OPTION) dispose(); } }
public void windowClosing(WindowEvent e) { Window w = e.getWindow(); w.setVisible(false); w.dispose(); System.exit(0); }