Java in a Nutshell

Previous Chapter 20
The java.awt.event Package
Next
 

20.10 java.awt.event.ContainerListener (JDK 1.1)

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

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

public abstract interface ContainerListener extends EventListener {
    // Public Instance Methods
            public abstract void componentAdded(ContainerEvent e);
            public abstract void componentRemoved(ContainerEvent e);
}

Implemented By:

AWTEventMulticaster, ContainerAdapter

Passed To:

AWTEventMulticaster.add(), AWTEventMulticaster.remove(), Container.addContainerListener(), Container.removeContainerListener()

Returned By:

AWTEventMulticaster.add(), AWTEventMulticaster.remove()


Previous Home Next
java.awt.event.ContainerEvent (JDK 1.1) Book Index java.awt.event.FocusAdapter (JDK 1.1)

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