Java in a Nutshell

Previous Chapter 20
The java.awt.event Package
Next
 

20.30 java.awt.event.WindowListener (JDK 1.1)

This interface defines the methods that an object must implement to "listen" for window events on AWT components. When a WindowEvent occurs, an AWT component notifies its registered WindowListener objects by invoking one of their methods.

An easy way to implement this interface is by subclassing the WindowAdapter class.

public abstract interface WindowListener extends EventListener {
    // Public Instance Methods
            public abstract void windowActivated(WindowEvent e);
            public abstract void windowClosed(WindowEvent e);
            public abstract void windowClosing(WindowEvent e);
            public abstract void windowDeactivated(WindowEvent e);
            public abstract void windowDeiconified(WindowEvent e);
            public abstract void windowIconified(WindowEvent e);
            public abstract void windowOpened(WindowEvent e);
}

Implemented By:

AWTEventMulticaster, WindowAdapter

Passed To:

AWTEventMulticaster.add(), AWTEventMulticaster.remove(), Window.addWindowListener(), Window.removeWindowListener()

Returned By:

AWTEventMulticaster.add(), AWTEventMulticaster.remove()


Previous Home Next
java.awt.event.WindowEvent (JDK 1.1) Book Index The java.awt.image Package

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java
This HTML Help has been published using the chm2web software.