Home Segments Top Top Previous Next

693: Mainline

For example, you can define the ApplicationClosingWindowListener class as a subclass of the Java-provided WindowAdapter class, rather than as a class that directly implements the WindowListener interface:

import java.awt.event.*; 
public class ApplicationClosingWindowListener extends WindowAdapter { 
 public void windowClosing(WindowEvent e) {System.exit(0);} 
}