01: package com.pk;
02:
03: //import java.awt.*;
04: import java.awt.event.*;
05:
06: /** A listener that you attach to the top-level Frame or JFrame of
07: * your application, so quitting the frame exits the application.
08: * 1998-99 Marty Hall, http://www.apl.jhu.edu/~hall/java/
09: */
10:
11: public class ExitListener extends WindowAdapter {
12: public void windowClosing(WindowEvent event) {
13: System.exit(0);
14: }
15: }
|