Container events are fired off when a component is added to or removed from a container. The AWT automatically deals with adding components to containers; these events are provided only for notification.
public class java.awt.event.ContainerEvent extends java.awt.event.ComponentEvent { // Constants public final static int COMPONENT_ADDED; public final static int COMPONENT_REMOVED; public final static int CONTAINER_FIRST; public final static int CONTAINER_LAST; // Constructors public ContainerEvent (Component source, int id, Component child); // Instance Methods public Component getChild(); public Container getContainer(); public String paramString(); }
Event type ID indicating that a component was added to a container.
Specifies the beginning range of container event ID values.
Specifies the ending range of container event ID values.
Event type ID indicating that a component was removed from a container.
The object that generated the event.
The event type ID of the event.
The component that was added or removed.
Constructs a ContainerEvent with the given characteristics.
The component that is being added or removed.
The container for this event.
String with current settings of the ContainerEvent.
ComponentEvent.paramString()
Helper method for toString() to generate string of current settings.
Component, ComponentEvent, Container, ContainerAdapter, ContainerListener