Java Reference
In-Depth Information
Table 26-3
Commonly Used Methods of the Container Class (continued)
RETURNS
NAME
DESCRIPTION
int getComponentCount()
Gets the number of components in the
panel.
Component[] getComponents()
Gets all the components in this
container.
Insets
getInsets() Determines the size of the
container's border.
LayoutManager
getLayout() Gets the layout manager for this
container.
Dimension getMaximumSize()
Returns the container's maximum
size.
Dimension getMinimumSize()
Returns the container's minimum size.
Dimension getPreferredSize()
Returns the preferred size of this
container.
void invalidate() Invalidates the container.
boolean isAncestorOf(Component c)
Checks if the component is contained
in the component hierarchy of this
container.
void list (PrintStream out, int indent)
Prints a listing of this container to
the specified output stream.
void list (PrintWriter out, int indent)
Prints out a list, starting at the
specified indention, to the specified
print writer.
void paint (Graphics g)
Paints the container.
void
paintComponents(Graphics g)
Paints each of the components in this
container.
protected
String paramString()
Returns the parameter string
for the state of this container.
void
print(Graphics g)
Prints the container.
void
printComponents(Graphics g)
Prints each of the components in this
container.
(continues)
Search WWH ::




Custom Search