JSR-296: The Swing Application Framework - Java
JSR-296: The Swing Application Framework - Java
JSR-296: The Swing Application Framework - Java
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
ExitListener Exampleclass MaybeExit implements <strong>Application</strong>.ExitListener {public boolean canExit(EventObject e) {JFrame f = getMainFrame();String s = "Really Exit?"; // *ResourceMapint o = JOptionPane.showConfirmDialog(f, s);return o == JOptionPane.YES_OPTION;}public void willExit(EventObject e) { }}<strong>Application</strong> app = <strong>Application</strong>.getInstance();app.addExitListener(new MaybeExit());2007 <strong>Java</strong>One SM Conference | Session TS-3942 | 22