Java Reference
In-Depth Information
Table 26-3
Commonly Used Methods of the Container Class (continued)
RETURNS
NAME
DESCRIPTION
protected
void
processContainerEvent(ContainerEvent e)
Processes container events occurring
on this container by dispatching them
to any registered ContainerListener
objects.
protected
void processEvent(AWTEvent e)
Processes events on this container.
void remove(Component comp)
Removes the specified component
from this container.
void remove(int index)
Removes the component specified by
index.
void removeAll() Removes all the components from this
container.
void
removeContainerListener(ContainerListener l)
Removes the specified container
listener.
void
removeNotify()
Makes this Container undisplayable
by removing its connection to its
native screen resource.
void
setCursor(Cursor cursor)
Sets the cursor image to the
specified cursor.
void
setFont(Font f)
Sets the font of this container.
void
setLayout(LayoutManager mgr)
Sets the layout manager for this
container.
void
update(Graphics g)
Updates the container.
void
protected
validate()
Validates this container.
The highest level class in the hierarchy is named Component. The Java
Component class defines objects that can be displayed on the screen and
interact with the user. The notion of a component is similar to that of a
Windows control. Examples of components are buttons, checkboxes,
scrollbars, and menus. The graphical user interface is implemented by
means of components. The Component class is one of the richest in the
AWT. You should consult the Java documentation to inspect the methods
in this class.
Search WWH ::




Custom Search