ComponentEvent

Name

ComponentEvent

[Graphic: Figure from the text]

Description

Component events are generated when a component is shown, hidden, moved, or resized. AWT automatically deals with component moves and resizing; these events are provided only for notification. Subclasses of ComponentEvent deal with other specific component-level events.

Class Definition

public class java.awt.event.ComponentEvent extends java.awt.AWTEvent {
 // Constants public final static int COMPONENT_FIRST;
public final static int COMPONENT_HIDDEN;
public final static int COMPONENT_LAST;
public final static int COMPONENT_MOVED;
public final static int COMPONENT_RESIZED;
public final static int COMPONENT_SHOWN; // Constructors public ComponentEvent (Component source, int id); // Instance Methods public Component getComponent();
public String paramString();
}

Constants

COMPONENT_FIRST

public final static int COMPONENT_FIRST

Specifies the beginning range of component event ID values.

COMPONENT_HIDDEN

public final static int COMPONENT_HIDDEN

Event type ID indicating that the component was hidden.

COMPONENT_LAST

public final static int COMPONENT_LAST

Specifies the ending range of component event ID values.

COMPONENT_MOVED

public final static int COMPONENT_MOVED

Event type ID indicating that the component was moved.

COMPONENT_RESIZED

public final static int COMPONENT_RESIZED

Event type ID indicating that the component was resized.

COMPONENT_SHOWN

public final static int COMPONENT_SHOWN

Event type ID indicating that the component was shown.

Constructors

ComponentEvent

public ComponentEvent (Component source, int id)

Instance Methods

getComponent

public Component getComponent()

paramString

public String paramString()

See Also

AWTEvent, Component, ComponentAdapter, ComponentListener, ContainerEvent, FocusEvent, InputEvent, PaintEvent, WindowEvent