ContainerEvent

Name

ContainerEvent

[Graphic: Figure from the text]

Description

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.

Class Definition

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();
}

Constants

COMPONENT_ADDED

public final static int COMPONENT_ADDED

Event type ID indicating that a component was added to a container.

CONTAINER_FIRST

public final static int CONTAINER_FIRST

Specifies the beginning range of container event ID values.

CONTAINER_LAST

public final static int CONTAINER_LAST

Specifies the ending range of container event ID values.

COMPONENT_REMOVED

public final static int COMPONENT_REMOVED

Event type ID indicating that a component was removed from a container.

Constructors

ContainerEvent

public ContainerEvent (Component source, int id, Component child)

Instance Methods

getChild

public Component getChild()

getContainer

public Container getContainer()

paramString

public String paramString()

See Also

Component, ComponentEvent, Container, ContainerAdapter, ContainerListener