SWING - ContainerEvent Class
The Class ContainerEvent represents that a container's contents changed because a component was added or removed.
Following is the declaration for java.awt.event.ContainerEvent class −
public class ContainerEvent extends ComponentEvent
Following are the fields for java.awt.Component class −
static int COMPONENT_ADDED − This event indicates that a component was added to the container.
static int COMPONENT_REMOVED − This event indicates that a component was removed from the container.
static int CONTAINER_FIRST − The first number in the range of IDs used for container events.
static int CONTAINER_LAST − The last number in the range of IDs used for container events.
|Sr.No.||Constructor & Description|
ContainerEvent(Component source, int id, Component child)
Constructs a ContainerEvent object.
|S.No.||Method & Description|
Returns the component that was affected by the event.
Returns the originator of the event.
Returns a parameter string identifying this event.
This class inherits methods from the following classes −