Java AWT

Previous Chapter 21
java.awt.event Reference
 
 

ContainerAdapter (New)

Name

ContainerAdapter (New)

[Graphic: Figure from the text]

Description

The ContainerAdapter class implements the methods of ContainerListener with empty functions. It may be easier for you to extend ContainerAdapter, overriding only those methods you are interested in, than to implement ContainerListener and provide the empty functions yourself.

Class Definition

public abstract class java.awt.event.ContainerAdapter
   extends java.lang.Object
   implements java.awt.event.ContainerListener {
  // Instance Methods
  public void componentAdded (ContainerEvent e);
  public void componentRemoved (ContainerEvent e);
}

Instance Methods

componentAdded

public void componentAdded (ComponentEvent e)

Parameters

e

The event that has occurred.

Description

Does nothing. Override this function to be notified when a component is added to a container.

componentRemoved

public void componentRemoved (ComponentEvent e)

Parameters

e

The event that has occurred.

Description

Does nothing. Override this function to be notified when a component is removed from a container.

See Also

ContainerEvent, ContainerListener


Previous Home  
ComponentListener (New) Book Index  

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java