
getComponent() retur ns the component that was moved, resized, shown, or hidden. It is
simply a convenient alternative to getSource(). getID() retur ns one of four COMPONENT_
constants to indicate what operation was perfor med on the Component.
public class ComponentEvent extends AWTEvent {
// Public Constructors
public ComponentEvent(Component source, int id);
// Public Constants
=100public static final int COMPONENT_FIRST;
=103public static final int COMPONENT_HIDDEN;
=103public static final int COMPONENT_LAST;
=100public static final int COMPONENT_MOVED;
=101public static final int COMPONENT_RESIZED;
=102public static final int COMPONENT_SHOWN;
// Public Instance Methods
public Component getComponent();
// Public Methods Overriding AWTEvent
public String paramString();
}
Hierar chy: Object→ java.util.EventObject(Serializable)→ AWTEvent→ ComponentEvent
Subc lasses: ContainerEvent, FocusEvent, InputEvent, PaintEvent, WindowEvent
Passed To: AWTEventMulticaster.{componentHidden(), componentMoved(), componentResized(),
componentShown()}, Component.processComponentEvent(), ComponentAdapter.{componentHidden(),
componentMoved(), componentResized(), componentShown()}, ComponentListener.{componentHidden(),
componentMoved(), componentResized(), componentShown()},
javax.swing .JViewpor t.V iewListener.componentResized()
ComponentListener Ja va 1.1
java.awt.e vent event listener PJ1.1
This interface defines the methods ...