ch.aplu.jgamegrid
Interface GGExitListener
- All Superinterfaces:
- java.util.EventListener
public interface GGExitListener
- extends java.util.EventListener
Declaration of a notification method called when the title bar close button is hit.
The following code may be used to show a confirmation dialog before exiting the
application:
public boolean notifyExit()
{
int rc = JOptionPane.showConfirmDialog(null,
"Are you sure?", "Exit Application", JOptionPane.OK_CANCEL_OPTION);
return (rc == JOptionPane.OK_OPTION);
{
notifyExit() may also be used for cleanup operations (closing streams,
closing connections to external devices, etc.)
Method Summary |
boolean |
notifyExit()
Event callback method called when the title bar close button is hit. |
notifyExit
boolean notifyExit()
- Event callback method called when the title bar close button is hit.
- Returns:
- true, if the application should terminate; false,
if the termination is suspended