List of usage examples for java.awt Event WINDOW_DESTROY
int WINDOW_DESTROY
To view the source code for java.awt Event WINDOW_DESTROY.
Click Source Link
From source file:ClipMe.java
public boolean handleEvent(Event e) { if (e.id == Event.WINDOW_DESTROY) { System.exit(0);//from w w w . j a v a 2 s .c o m return true; // never gets here } return super.handleEvent(e); }
From source file:DummyAppletContext.java
/** * Event handler to catch the Frame (window) close action, * and exit the program./*from w w w . j a va 2 s.co m*/ * * @param evt The event that occurred * @return false if the event was not handled by this object. */ public boolean handleEvent(Event evt) { if (evt.id == Event.WINDOW_DESTROY) { System.exit(0); } return super.handleEvent(evt); }