Class java.awt.Container
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class java.awt.Container
java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
  -  public class Container
  -  extends Component
A generic Abstract Window Toolkit(AWT) container object is a component 
that can contain other AWT components.
   
  -   add(Component) add(Component)
-  
Adds the specified component to this container.
  
-   add(Component, int) add(Component, int)
-  
Adds the specified component to this container at the given position.
  
-   add(String, Component) add(String, Component)
-  Adds the specified component to this container.
  
-   addNotify() addNotify()
-  
Notifies the container to create a peer.
  
-   countComponents() countComponents()
-  
Returns the number of components in this panel.
  
-   deliverEvent(Event) deliverEvent(Event)
-  Delivers an event.
  
-   getComponent(int) getComponent(int)
-  
Gets the nth component in this container.
  
-   getComponents() getComponents()
-  Gets all the components in this container.
  
-   getLayout() getLayout()
-  
Gets the layout manager for this container.
  
-   insets() insets()
-  Returns the insets of the container.
  
-   layout() layout()
-  
Does a layout on this Container.
  
-   list(PrintStream, int) list(PrintStream, int)
-  Prints out a list, starting at the specified indention, to the specified
out stream.
  
-   locate(int, int) locate(int, int)
-  Locates the component that contains the x,y position.
  
-   minimumSize() minimumSize()
-  
Returns the minimum size of this container.
  
-   paintComponents(Graphics) paintComponents(Graphics)
-  
Paints the components in this container.
  
-   paramString() paramString()
-  Returns the parameter String of this Container.
  
-   preferredSize() preferredSize()
-  
Returns the preferred size of this container.
  
-   printComponents(Graphics) printComponents(Graphics)
-  
Prints the components in this container.
  
-   remove(Component) remove(Component)
-  
Removes the specified component from this container.
  
-   removeAll() removeAll()
-  
Removes all the components from this container.
  
-   removeNotify() removeNotify()
-  
Notifies the container to remove its peer.
  
-   setLayout(LayoutManager) setLayout(LayoutManager)
-  
Sets the layout manager for this container.
  
-   validate() validate()
-  
Validates this Container and all of the components contained within it.
   
 countComponents
countComponents
  public int countComponents()
  -  Returns the number of components in this panel.
  
    -  See Also:
    
-  getComponent
  
 
 getComponent
getComponent
  public synchronized Component getComponent(int n)
  -  Gets the nth component in this container.
  
    -  Parameters:
    
-  n - the number of the component to get
    
-  Throws: ArrayIndexOutOfBoundsException
    
-  If the nth value does not 
exist.
  
 
 getComponents
getComponents
  public synchronized Component[] getComponents()
  -  Gets all the components in this container.
 insets
insets
  public Insets insets()
  -  Returns the insets of the container. The insets indicate the size of
the border of the container. A Frame, for example, will have a top inset
that corresponds to the height of the Frame's title bar.
  
    -  See Also:
    
-  LayoutManager
  
 
 add
add
  public Component add(Component comp)
  -  Adds the specified component to this container.
  
    -  Parameters:
    
-  comp - the component to be added
  
 
 add
add
  public synchronized Component add(Component comp,
                                    int pos)
  -  Adds the specified component to this container at the given position.
  
    -  Parameters:
    
-  comp - the component to be added
    -  pos - the position at which to insert the component. -1
means insert at the end.
    
-  See Also:
    
-  remove
  
 
 add
add
  public synchronized Component add(String name,
                                    Component comp)
  -  Adds the specified component to this container. The component
is also added to the layout manager of this container using the
name specified
.
  
    -  Parameters:
    
-  name - the component name
    -  comp - the component to be added
    
-  See Also:
    
-  remove, LayoutManager
  
 
 remove
remove
  public synchronized void remove(Component comp)
  -  Removes the specified component from this container.
  
    -  Parameters:
    
-  comp - the component to be removed
    
-  See Also:
    
-  add
  
 
 removeAll
removeAll
  public synchronized void removeAll()
  -  Removes all the components from this container.
  
    -  See Also:
    
-  add, remove
  
 
 getLayout
getLayout
  public LayoutManager getLayout()
  -  Gets the layout manager for this container.
  
    -  See Also:
    
-  layout, setLayout
  
 
 setLayout
setLayout
  public void setLayout(LayoutManager mgr)
  -  Sets the layout manager for this container.
  
    -  Parameters:
    
-  mgr - the specified layout manager
    
-  See Also:
    
-  layout, getLayout
  
 
 layout
layout
  public synchronized void layout()
  -  Does a layout on this Container.
  
    -  Overrides:
    
-  layout in class Component
    
-  See Also:
    
-  setLayout
  
 
 validate
validate
  public synchronized void validate()
  -  Validates this Container and all of the components contained within it.
  
    -  Overrides:
    
-  validate in class Component
    
-  See Also:
    
-  validate, invalidate
  
 
 preferredSize
preferredSize
  public synchronized Dimension preferredSize()
  -  Returns the preferred size of this container.
  
    -  Overrides:
    
-  preferredSize in class Component
    
-  See Also:
    
-  minimumSize
  
 
 minimumSize
minimumSize
  public synchronized Dimension minimumSize()
  -  Returns the minimum size of this container.
  
    -  Overrides:
    
-  minimumSize in class Component
    
-  See Also:
    
-  preferredSize
  
 
 paintComponents
paintComponents
  public void paintComponents(Graphics g)
  -  Paints the components in this container.
  
    -  Parameters:
    
-  g - the specified Graphics window
    
-  See Also:
    
-  paint, paintAll
  
 
 printComponents
printComponents
  public void printComponents(Graphics g)
  -  Prints the components in this container.
  
    -  Parameters:
    
-  g - the specified Graphics window
    
-  See Also:
    
-  print, printAll
  
 
 deliverEvent
deliverEvent
  public void deliverEvent(Event e)
  -  Delivers an event. The appropriate component is located and
the event is delivered to it.
  
    -  Parameters:
    
-  e - the event
    
-  Overrides:
    
-  deliverEvent in class Component
    
-  See Also:
    
-  handleEvent, postEvent
  
 
 locate
locate
  public Component locate(int x,
                          int y)
  -  Locates the component that contains the x,y position.
  
    -  Parameters:
    
-  x - the x coordinate
    -  y - the y coordinate
    
-  Returns:
    
-  null if the component is not within the x and y
coordinates; returns the component otherwise.
    
-  Overrides:
    
-  locate in class Component
    
-  See Also:
    
-  inside
  
 
 addNotify
addNotify
  public synchronized void addNotify()
  -  Notifies the container to create a peer. It will also
notify the components contained in this container.
  
    -  Overrides:
    
-  addNotify in class Component
    
-  See Also:
    
-  removeNotify
  
 
 removeNotify
removeNotify
  public synchronized void removeNotify()
  -  Notifies the container to remove its peer. It will
also notify the components contained in this container.
  
    -  Overrides:
    
-  removeNotify in class Component
    
-  See Also:
    
-  addNotify
  
 
 paramString
paramString
  protected String paramString()
  -  Returns the parameter String of this Container.
  
    -  Overrides:
    
-  paramString in class Component
  
 
 list
list
  public void list(PrintStream out,
                   int indent)
  -  Prints out a list, starting at the specified indention, to the specified
out stream.
  
    -  Parameters:
    
-  out - the Stream name
    -  indent - the start of the list
    
-  Overrides:
    
-  list in class Component
  
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index