APIdia Launch Partner
Top Description Methods
java.awt.event

public Interface ComponentListener

extends EventListener
Known Direct Implementers
javax.swing.AncestorNotifier, javax.swing.plaf.basic.BasicInternalFrameUI.ComponentHandler, javax.swing.plaf.basic.BasicInternalFrameUI.Handler, javax.swing.plaf.basic.BasicPopupMenuUI.MouseGrabber, javax.swing.plaf.basic.BasicSliderUI.Handler, javax.swing.plaf.synth.SynthDesktopPaneUI.TaskBar, javax.swing.text.html.HTMLEditorKit.HTMLFactory.BodyBlockView, sun.awt.im.InputContext, java.awt.AWTEventMulticaster, java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, java.awt.event.ComponentAdapter
Imports
java.util.EventListener

The listener interface for receiving component events. The class that is interested in processing a component event either implements this interface (and all the methods it contains) or extends the abstract ComponentAdapter class (overriding only the methods of interest). The listener object created from that class is then registered with a component using the component's addComponentListener method. When the component's size, location, or visibility changes, the relevant method in the listener object is invoked, and the ComponentEvent is passed to it.

Component events are provided for notification purposes ONLY; The AWT will automatically handle component moves and resizes internally so that GUI layout works properly regardless of whether a program registers a ComponentListener or not.

Author
Carl Quinn
Since
1.1
See Also
ComponentAdapter, ComponentEvent, Tutorial: Writing a Component Listener

Method Summary

Modifier and TypeMethod and Description
public void
componentHidden(ComponentEvent
the event to be processed
e
)

Invoked when the component has been made invisible.

public void
componentMoved(ComponentEvent
the event to be processed
e
)

Invoked when the component's position changes.

public void
componentResized(ComponentEvent
the event to be processed
e
)

Invoked when the component's size changes.

public void
componentShown(ComponentEvent
the event to be processed
e
)

Invoked when the component has been made visible.

Method Detail

componentHiddenback to summary
public void componentHidden(ComponentEvent e)

Invoked when the component has been made invisible.

Parameters
e:ComponentEvent

the event to be processed

componentMovedback to summary
public void componentMoved(ComponentEvent e)

Invoked when the component's position changes.

Parameters
e:ComponentEvent

the event to be processed

componentResizedback to summary
public void componentResized(ComponentEvent e)

Invoked when the component's size changes.

Parameters
e:ComponentEvent

the event to be processed

componentShownback to summary
public void componentShown(ComponentEvent e)

Invoked when the component has been made visible.

Parameters
e:ComponentEvent

the event to be processed