A low-level event which indicates that a container's contents
changed because a component was added or removed.
- public class ContainerEvent
- extends ComponentEvent
Container events are provided for notification purposes ONLY;
The AWT will automatically handle changes to the containers
contents internally so that the program works properly regardless of
whether the program is receiving these events or not.
This low-level event is generated by a container object (such as a
Panel) when a component is added to it or removed from it.
The event is passed to every
ContainerAdapter object which registered to receive such
events using the component's
ContainerAdapter objects implement the
ContainerListener interface.) Each such listener object
ContainerEvent when the event occurs.
- See Also:
Tutorial: Writing a Container Listener,
Reference: The Java Class Libraries (update file), Serialized Form
This event indicates that a component was added to the container.
This event indicates that a component was removed from the container.
The first number in the range of ids used for container events.
The last number in the range of ids used for container events.
|Fields inherited from class java.awt.AWTEvent
public static final int CONTAINER_FIRST
- The first number in the range of ids used for container events.
public static final int CONTAINER_LAST
- The last number in the range of ids used for container events.
public static final int COMPONENT_ADDED
- This event indicates that a component was added to the container.
public static final int COMPONENT_REMOVED
- This event indicates that a component was removed from the container.
public ContainerEvent(Component source,
- Constructs a ContainerEvent object.
- the Component object (container) that originated the event
- an integer indicating the type of event
- the component that was added or removed
public Container getContainer()
- Returns the originator of the event.
- the Container object that originated the event
public Component getChild()
- Returns the component that was affected by the event.
- the Component object that was added or removed
public String paramString()
- Returns a parameter string identifying this event.
This method is useful for event-logging and for debugging.
- a string identifying the event and its attributes
- paramString in class ComponentEvent
Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.