java.awt
Class Container

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.Component sample code for java.awt.Component definition code for java.awt.Component 
      extended by java.awt.Container
All Implemented Interfaces:
ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver , MenuContainer sample code for java.awt.MenuContainer definition code for java.awt.MenuContainer , Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
BasicSplitPaneDivider sample code for javax.swing.plaf.basic.BasicSplitPaneDivider definition code for javax.swing.plaf.basic.BasicSplitPaneDivider , CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane , DefaultTreeCellEditor.EditorContainer sample code for javax.swing.tree.DefaultTreeCellEditor.EditorContainer definition code for javax.swing.tree.DefaultTreeCellEditor.EditorContainer , JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent , Panel sample code for java.awt.Panel definition code for java.awt.Panel , ScrollPane sample code for java.awt.ScrollPane definition code for java.awt.ScrollPane , Window sample code for java.awt.Window definition code for java.awt.Window

public class Container
extends Component sample code for java.awt.Component definition code for java.awt.Component

A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.

Components added to a container are tracked in a list. The order of the list will define the components' front-to-back stacking order within the container. If no index is specified when adding a component to a container, it will be added to the end of the list (and hence to the bottom of the stacking order).

Note: For details on the focus subsystem, see How to Use the Focus Subsystem, a section in The Java Tutorial, and the Focus Specification for more information.

Since:
JDK1.0
See Also:
add(java.awt.Component, int) sample code for java.awt.Container.add(java.awt.Component, int) definition code for java.awt.Container.add(java.awt.Component, int) , getComponent(int) sample code for java.awt.Container.getComponent(int) definition code for java.awt.Container.getComponent(int) , LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager , Serialized Form

Nested Class Summary
protected  class Container.AccessibleAWTContainer sample code for java.awt.Container.AccessibleAWTContainer definition code for java.awt.Container.AccessibleAWTContainer
          Inner class of Container used to provide default support for accessibility.
 
Nested classes/interfaces inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
Component.AccessibleAWTComponent sample code for java.awt.Component.AccessibleAWTComponent definition code for java.awt.Component.AccessibleAWTComponent , Component.BltBufferStrategy sample code for java.awt.Component.BltBufferStrategy definition code for java.awt.Component.BltBufferStrategy , Component.FlipBufferStrategy sample code for java.awt.Component.FlipBufferStrategy definition code for java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
BOTTOM_ALIGNMENT sample code for java.awt.Component.BOTTOM_ALIGNMENT definition code for java.awt.Component.BOTTOM_ALIGNMENT , CENTER_ALIGNMENT sample code for java.awt.Component.CENTER_ALIGNMENT definition code for java.awt.Component.CENTER_ALIGNMENT , LEFT_ALIGNMENT sample code for java.awt.Component.LEFT_ALIGNMENT definition code for java.awt.Component.LEFT_ALIGNMENT , RIGHT_ALIGNMENT sample code for java.awt.Component.RIGHT_ALIGNMENT definition code for java.awt.Component.RIGHT_ALIGNMENT , TOP_ALIGNMENT sample code for java.awt.Component.TOP_ALIGNMENT definition code for java.awt.Component.TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver
ABORT sample code for java.awt.image.ImageObserver.ABORT definition code for java.awt.image.ImageObserver.ABORT , ALLBITS sample code for java.awt.image.ImageObserver.ALLBITS definition code for java.awt.image.ImageObserver.ALLBITS , ERROR sample code for java.awt.image.ImageObserver.ERROR definition code for java.awt.image.ImageObserver.ERROR , FRAMEBITS sample code for java.awt.image.ImageObserver.FRAMEBITS definition code for java.awt.image.ImageObserver.FRAMEBITS , HEIGHT sample code for java.awt.image.ImageObserver.HEIGHT definition code for java.awt.image.ImageObserver.HEIGHT , PROPERTIES sample code for java.awt.image.ImageObserver.PROPERTIES definition code for java.awt.image.ImageObserver.PROPERTIES , SOMEBITS sample code for java.awt.image.ImageObserver.SOMEBITS definition code for java.awt.image.ImageObserver.SOMEBITS , WIDTH sample code for java.awt.image.ImageObserver.WIDTH definition code for java.awt.image.ImageObserver.WIDTH
 
Constructor Summary
Container sample code for java.awt.Container.Container() definition code for java.awt.Container.Container() ()
          Constructs a new Container.
 
Method Summary
 Component sample code for java.awt.Component definition code for java.awt.Component add sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  comp)
          Appends the specified component to the end of this container.
 Component sample code for java.awt.Component definition code for java.awt.Component add sample code for java.awt.Container.add(java.awt.Component, int) definition code for java.awt.Container.add(java.awt.Component, int) (Component sample code for java.awt.Component definition code for java.awt.Component  comp, int index)
          Adds the specified component to this container at the given position.
 void add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object) (Component sample code for java.awt.Component definition code for java.awt.Component  comp, Object sample code for java.lang.Object definition code for java.lang.Object  constraints)
          Adds the specified component to the end of this container.
 void add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object, int) (Component sample code for java.awt.Component definition code for java.awt.Component  comp, Object sample code for java.lang.Object definition code for java.lang.Object  constraints, int index)
          Adds the specified component to this container with the specified constraints at the specified index.
 Component sample code for java.awt.Component definition code for java.awt.Component add sample code for java.awt.Container.add(java.lang.String, java.awt.Component) definition code for java.awt.Container.add(java.lang.String, java.awt.Component) (String sample code for java.lang.String definition code for java.lang.String  name, Component sample code for java.awt.Component definition code for java.awt.Component  comp)
          Adds the specified component to this container.
 void addContainerListener sample code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) (ContainerListener sample code for java.awt.event.ContainerListener definition code for java.awt.event.ContainerListener  l)
          Adds the specified container listener to receive container events from this container.
protected  void addImpl sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) (Component sample code for java.awt.Component definition code for java.awt.Component  comp, Object sample code for java.lang.Object definition code for java.lang.Object  constraints, int index)
          Adds the specified component to this container at the specified index.
 void addNotify sample code for java.awt.Container.addNotify() definition code for java.awt.Container.addNotify() ()
          Makes this Container displayable by connecting it to a native screen resource.
 void addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) (PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
          Adds a PropertyChangeListener to the listener list.
 void addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) (String sample code for java.lang.String definition code for java.lang.String  propertyName, PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
          Adds a PropertyChangeListener to the listener list for a specific property.
 void applyComponentOrientation sample code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation) (ComponentOrientation sample code for java.awt.ComponentOrientation definition code for java.awt.ComponentOrientation  o)
          Sets the ComponentOrientation property of this container and all components contained within it.
 boolean areFocusTraversalKeysSet sample code for java.awt.Container.areFocusTraversalKeysSet(int) definition code for java.awt.Container.areFocusTraversalKeysSet(int) (int id)
          Returns whether the Set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Container.
 int countComponents sample code for java.awt.Container.countComponents() definition code for java.awt.Container.countComponents() ()
          Deprecated. As of JDK version 1.1, replaced by getComponentCount().
 void deliverEvent sample code for java.awt.Container.deliverEvent(java.awt.Event) definition code for java.awt.Container.deliverEvent(java.awt.Event) (Event sample code for java.awt.Event definition code for java.awt.Event  e)
          Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e)
 void doLayout sample code for java.awt.Container.doLayout() definition code for java.awt.Container.doLayout() ()
          Causes this container to lay out its components.
 Component sample code for java.awt.Component definition code for java.awt.Component findComponentAt sample code for java.awt.Container.findComponentAt(int, int) definition code for java.awt.Container.findComponentAt(int, int) (int x, int y)
          Locates the visible child component that contains the specified position.
 Component sample code for java.awt.Component definition code for java.awt.Component findComponentAt sample code for java.awt.Container.findComponentAt(java.awt.Point) definition code for java.awt.Container.findComponentAt(java.awt.Point) (Point sample code for java.awt.Point definition code for java.awt.Point  p)
          Locates the visible child component that contains the specified point.
 float getAlignmentX sample code for java.awt.Container.getAlignmentX() definition code for java.awt.Container.getAlignmentX() ()
          Returns the alignment along the x axis.
 float getAlignmentY sample code for java.awt.Container.getAlignmentY() definition code for java.awt.Container.getAlignmentY() ()
          Returns the alignment along the y axis.
 Component sample code for java.awt.Component definition code for java.awt.Component getComponent sample code for java.awt.Container.getComponent(int) definition code for java.awt.Container.getComponent(int) (int n)
          Gets the nth component in this container.
 Component sample code for java.awt.Component definition code for java.awt.Component getComponentAt sample code for java.awt.Container.getComponentAt(int, int) definition code for java.awt.Container.getComponentAt(int, int) (int x, int y)
          Locates the component that contains the x,y position.
 Component sample code for java.awt.Component definition code for java.awt.Component getComponentAt sample code for java.awt.Container.getComponentAt(java.awt.Point) definition code for java.awt.Container.getComponentAt(java.awt.Point) (Point sample code for java.awt.Point definition code for java.awt.Point  p)
          Gets the component that contains the specified point.
 int getComponentCount sample code for java.awt.Container.getComponentCount() definition code for java.awt.Container.getComponentCount() ()
          Gets the number of components in this panel.
 Component sample code for java.awt.Component definition code for java.awt.Component [] getComponents sample code for java.awt.Container.getComponents() definition code for java.awt.Container.getComponents() ()
          Gets all the components in this container.
 int getComponentZOrder sample code for java.awt.Container.getComponentZOrder(java.awt.Component) definition code for java.awt.Container.getComponentZOrder(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  comp)
          Returns the z-order index of the component inside the container.
 ContainerListener sample code for java.awt.event.ContainerListener definition code for java.awt.event.ContainerListener [] getContainerListeners sample code for java.awt.Container.getContainerListeners() definition code for java.awt.Container.getContainerListeners() ()
          Returns an array of all the container listeners registered on this container.
 Set sample code for java.util.Set definition code for java.util.Set <AWTKeyStroke sample code for java.awt.AWTKeyStroke definition code for java.awt.AWTKeyStroke > getFocusTraversalKeys sample code for java.awt.Container.getFocusTraversalKeys(int) definition code for java.awt.Container.getFocusTraversalKeys(int) (int id)
          Returns the Set of focus traversal keys for a given traversal operation for this Container.
 FocusTraversalPolicy sample code for java.awt.FocusTraversalPolicy definition code for java.awt.FocusTraversalPolicy getFocusTraversalPolicy sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy() ()
          Returns the focus traversal policy that will manage keyboard traversal of this Container's children, or null if this Container is not a focus cycle root.
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getInsets sample code for java.awt.Container.getInsets() definition code for java.awt.Container.getInsets() ()
          Determines the insets of this container, which indicate the size of the container's border.
 LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager getLayout sample code for java.awt.Container.getLayout() definition code for java.awt.Container.getLayout() ()
          Gets the layout manager for this container.
<T extends EventListener sample code for java.util.EventListener definition code for java.util.EventListener >
T[]
getListeners sample code for java.awt.Container.getListeners(java.lang.Class) definition code for java.awt.Container.getListeners(java.lang.Class) (Class sample code for java.lang.Class definition code for java.lang.Class <T> listenerType)
          Returns an array of all the objects currently registered as FooListeners upon this Container.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMaximumSize sample code for java.awt.Container.getMaximumSize() definition code for java.awt.Container.getMaximumSize() ()
          Returns the maximum size of this container.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMinimumSize sample code for java.awt.Container.getMinimumSize() definition code for java.awt.Container.getMinimumSize() ()
          Returns the minimum size of this container.
 Point sample code for java.awt.Point definition code for java.awt.Point getMousePosition sample code for java.awt.Container.getMousePosition(boolean) definition code for java.awt.Container.getMousePosition(boolean) (boolean allowChildren)
          Returns the position of the mouse pointer in this Container's coordinate space if the Container is under the mouse pointer, otherwise returns null.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredSize sample code for java.awt.Container.getPreferredSize() definition code for java.awt.Container.getPreferredSize() ()
          Returns the preferred size of this container.
 Insets sample code for java.awt.Insets definition code for java.awt.Insets insets sample code for java.awt.Container.insets() definition code for java.awt.Container.insets() ()
          Deprecated. As of JDK version 1.1, replaced by getInsets().
 void invalidate sample code for java.awt.Container.invalidate() definition code for java.awt.Container.invalidate() ()
          Invalidates the container.
 boolean isAncestorOf sample code for java.awt.Container.isAncestorOf(java.awt.Component) definition code for java.awt.Container.isAncestorOf(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
          Checks if the component is contained in the component hierarchy of this container.
 boolean isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot() definition code for java.awt.Container.isFocusCycleRoot() ()
          Returns whether this Container is the root of a focus traversal cycle.
 boolean isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot(java.awt.Container) definition code for java.awt.Container.isFocusCycleRoot(java.awt.Container) (Container sample code for java.awt.Container definition code for java.awt.Container  container)
          Returns whether the specified Container is the focus cycle root of this Container's focus traversal cycle.
 boolean isFocusTraversalPolicyProvider sample code for java.awt.Container.isFocusTraversalPolicyProvider() definition code for java.awt.Container.isFocusTraversalPolicyProvider() ()
          Returns whether this container provides focus traversal policy.
 boolean isFocusTraversalPolicySet sample code for java.awt.Container.isFocusTraversalPolicySet() definition code for java.awt.Container.isFocusTraversalPolicySet() ()
          Returns whether the focus traversal policy has been explicitly set for this Container.
 void layout sample code for java.awt.Container.layout() definition code for java.awt.Container.layout() ()
          Deprecated. As of JDK version 1.1, replaced by doLayout().
 void list sample code for java.awt.Container.list(java.io.PrintStream, int) definition code for java.awt.Container.list(java.io.PrintStream, int) (PrintStream sample code for java.io.PrintStream definition code for java.io.PrintStream  out, int indent)
          Prints a listing of this container to the specified output stream.
 void list sample code for java.awt.Container.list(java.io.PrintWriter, int) definition code for java.awt.Container.list(java.io.PrintWriter, int) (PrintWriter sample code for java.io.PrintWriter definition code for java.io.PrintWriter  out, int indent)
          Prints out a list, starting at the specified indentation, to the specified print writer.
 Component sample code for java.awt.Component definition code for java.awt.Component locate sample code for java.awt.Container.locate(int, int) definition code for java.awt.Container.locate(int, int) (int x, int y)
          Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension minimumSize sample code for java.awt.Container.minimumSize() definition code for java.awt.Container.minimumSize() ()
          Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
 void paint sample code for java.awt.Container.paint(java.awt.Graphics) definition code for java.awt.Container.paint(java.awt.Graphics) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
          Paints the container.
 void paintComponents sample code for java.awt.Container.paintComponents(java.awt.Graphics) definition code for java.awt.Container.paintComponents(java.awt.Graphics) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
          Paints each of the components in this container.
protected  String sample code for java.lang.String definition code for java.lang.String paramString sample code for java.awt.Container.paramString() definition code for java.awt.Container.paramString() ()
          Returns a string representing the state of this Container.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension preferredSize sample code for java.awt.Container.preferredSize() definition code for java.awt.Container.preferredSize() ()
          Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 void print sample code for java.awt.Container.print(java.awt.Graphics) definition code for java.awt.Container.print(java.awt.Graphics) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
          Prints the container.
 void printComponents sample code for java.awt.Container.printComponents(java.awt.Graphics) definition code for java.awt.Container.printComponents(java.awt.Graphics) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
          Prints each of the components in this container.
protected  void processContainerEvent sample code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent) definition code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent) (ContainerEvent sample code for java.awt.event.ContainerEvent definition code for java.awt.event.ContainerEvent  e)
          Processes container events occurring on this container by dispatching them to any registered ContainerListener objects.
protected  void processEvent sample code for java.awt.Container.processEvent(java.awt.AWTEvent) definition code for java.awt.Container.processEvent(java.awt.AWTEvent) (AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent  e)
          Processes events on this container.
 void remove sample code for java.awt.Container.remove(java.awt.Component) definition code for java.awt.Container.remove(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  comp)
          Removes the specified component from this container.
 void remove sample code for java.awt.Container.remove(int) definition code for java.awt.Container.remove(int) (int index)
          Removes the component, specified by index, from this container.
 void removeAll sample code for java.awt.Container.removeAll() definition code for java.awt.Container.removeAll() ()
          Removes all the components from this container.
 void removeContainerListener sample code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) (ContainerListener sample code for java.awt.event.ContainerListener definition code for java.awt.event.ContainerListener  l)
          Removes the specified container listener so it no longer receives container events from this container.
 void removeNotify sample code for java.awt.Container.removeNotify() definition code for java.awt.Container.removeNotify() ()
          Makes this Container undisplayable by removing its connection to its native screen resource.
 void setComponentZOrder sample code for java.awt.Container.setComponentZOrder(java.awt.Component, int) definition code for java.awt.Container.setComponentZOrder(java.awt.Component, int) (Component sample code for java.awt.Component definition code for java.awt.Component  comp, int index)
          Moves the specified component to the specified z-order index in the container.
 void setFocusCycleRoot sample code for java.awt.Container.setFocusCycleRoot(boolean) definition code for java.awt.Container.setFocusCycleRoot(boolean) (boolean focusCycleRoot)
          Sets whether this Container is the root of a focus traversal cycle.
 void setFocusTraversalKeys sample code for java.awt.Container.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Container.setFocusTraversalKeys(int, java.util.Set) (int id, Set sample code for java.util.Set definition code for java.util.Set <? extends AWTKeyStroke sample code for java.awt.AWTKeyStroke definition code for java.awt.AWTKeyStroke > keystrokes)
          Sets the focus traversal keys for a given traversal operation for this Container.
 void setFocusTraversalPolicy sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) (FocusTraversalPolicy sample code for java.awt.FocusTraversalPolicy definition code for java.awt.FocusTraversalPolicy  policy)
          Sets the focus traversal policy that will manage keyboard traversal of this Container's children, if this Container is a focus cycle root.
 void setFocusTraversalPolicyProvider sample code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) definition code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) (boolean provider)
          Sets whether this container will be used to provide focus traversal policy.
 void setFont sample code for java.awt.Container.setFont(java.awt.Font) definition code for java.awt.Container.setFont(java.awt.Font) (Font sample code for java.awt.Font definition code for java.awt.Font  f)
          Sets the font of this container.
 void setLayout sample code for java.awt.Container.setLayout(java.awt.LayoutManager) definition code for java.awt.Container.setLayout(java.awt.LayoutManager) (LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager  mgr)
          Sets the layout manager for this container.
 void transferFocusBackward sample code for java.awt.Container.transferFocusBackward() definition code for java.awt.Container.transferFocusBackward() ()
          Transfers the focus to the previous component, as though this Component were the focus owner.
 void transferFocusDownCycle sample code for java.awt.Container.transferFocusDownCycle() definition code for java.awt.Container.transferFocusDownCycle() ()
          Transfers the focus down one focus traversal cycle.
 void update sample code for java.awt.Container.update(java.awt.Graphics) definition code for java.awt.Container.update(java.awt.Graphics) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
          Updates the container.
 void validate sample code for java.awt.Container.validate() definition code for java.awt.Container.validate() ()
          Validates this container and all of its subcomponents.
protected  void validateTree sample code for java.awt.Container.validateTree() definition code for java.awt.Container.validateTree() ()
          Recursively descends the container tree and recomputes the layout for any subtrees marked as needing it (those marked as invalid).
 
Methods inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
action sample code for java.awt.Component.action(java.awt.Event, java.lang.Object) definition code for java.awt.Component.action(java.awt.Event, java.lang.Object) , add sample code for java.awt.Component.add(java.awt.PopupMenu) definition code for java.awt.Component.add(java.awt.PopupMenu) , addComponentListener sample code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) , addFocusListener sample code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) , addHierarchyBoundsListener sample code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , addHierarchyListener sample code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) , addInputMethodListener sample code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) , addKeyListener sample code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) , addMouseListener sample code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) , addMouseMotionListener sample code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) , addMouseWheelListener sample code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) , bounds sample code for java.awt.Component.bounds() definition code for java.awt.Component.bounds() , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , coalesceEvents sample code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) definition code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) , contains sample code for java.awt.Component.contains(int, int) definition code for java.awt.Component.contains(int, int) , contains sample code for java.awt.Component.contains(java.awt.Point) definition code for java.awt.Component.contains(java.awt.Point) , createImage sample code for java.awt.Component.createImage(java.awt.image.ImageProducer) definition code for java.awt.Component.createImage(java.awt.image.ImageProducer) , createImage sample code for java.awt.Component.createImage(int, int) definition code for java.awt.Component.createImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int) definition code for java.awt.Component.createVolatileImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) definition code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) , disable sample code for java.awt.Component.disable() definition code for java.awt.Component.disable() , disableEvents sample code for java.awt.Component.disableEvents(long) definition code for java.awt.Component.disableEvents(long) , dispatchEvent sample code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) , enable sample code for java.awt.Component.enable() definition code for java.awt.Component.enable() , enable sample code for java.awt.Component.enable(boolean) definition code for java.awt.Component.enable(boolean) , enableEvents sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long) , enableInputMethods sample code for java.awt.Component.enableInputMethods(boolean) definition code for java.awt.Component.enableInputMethods(boolean) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, boolean, boolean) definition code for java.awt.Component.firePropertyChange(java.lang.String, boolean, boolean) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) definition code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, char, char) definition code for java.awt.Component.firePropertyChange(java.lang.String, char, char) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, double, double) definition code for java.awt.Component.firePropertyChange(java.lang.String, double, double) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, float, float) definition code for java.awt.Component.firePropertyChange(java.lang.String, float, float) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, int, int) definition code for java.awt.Component.firePropertyChange(java.lang.String, int, int) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, long, long) definition code for java.awt.Component.firePropertyChange(java.lang.String, long, long) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, short, short) definition code for java.awt.Component.firePropertyChange(java.lang.String, short, short) , getAccessibleContext sample code for java.awt.Component.getAccessibleContext() definition code for java.awt.Component.getAccessibleContext() , getBackground sample code for java.awt.Component.getBackground() definition code for java.awt.Component.getBackground() , getBounds sample code for java.awt.Component.getBounds() definition code for java.awt.Component.getBounds() , getBounds sample code for java.awt.Component.getBounds(java.awt.Rectangle) definition code for java.awt.Component.getBounds(java.awt.Rectangle) , getColorModel sample code for java.awt.Component.getColorModel() definition code for java.awt.Component.getColorModel() , getComponentListeners sample code for java.awt.Component.getComponentListeners() definition code for java.awt.Component.getComponentListeners() , getComponentOrientation sample code for java.awt.Component.getComponentOrientation() definition code for java.awt.Component.getComponentOrientation() , getCursor sample code for java.awt.Component.getCursor() definition code for java.awt.Component.getCursor() , getDropTarget sample code for java.awt.Component.getDropTarget() definition code for java.awt.Component.getDropTarget() , getFocusCycleRootAncestor sample code for java.awt.Component.getFocusCycleRootAncestor() definition code for java.awt.Component.getFocusCycleRootAncestor() , getFocusListeners sample code for java.awt.Component.getFocusListeners() definition code for java.awt.Component.getFocusListeners() , getFocusTraversalKeysEnabled sample code for java.awt.Component.getFocusTraversalKeysEnabled() definition code for java.awt.Component.getFocusTraversalKeysEnabled() , getFont sample code for java.awt.Component.getFont() definition code for java.awt.Component.getFont() , getFontMetrics sample code for java.awt.Component.getFontMetrics(java.awt.Font) definition code for java.awt.Component.getFontMetrics(java.awt.Font) , getForeground sample code for java.awt.Component.getForeground() definition code for java.awt.Component.getForeground() , getGraphics sample code for java.awt.Component.getGraphics() definition code for java.awt.Component.getGraphics() , getGraphicsConfiguration sample code for java.awt.Component.getGraphicsConfiguration() definition code for java.awt.Component.getGraphicsConfiguration() , getHeight sample code for java.awt.Component.getHeight() definition code for java.awt.Component.getHeight() , getHierarchyBoundsListeners sample code for java.awt.Component.getHierarchyBoundsListeners() definition code for java.awt.Component.getHierarchyBoundsListeners() , getHierarchyListeners sample code for java.awt.Component.getHierarchyListeners() definition code for java.awt.Component.getHierarchyListeners() , getIgnoreRepaint sample code for java.awt.Component.getIgnoreRepaint() definition code for java.awt.Component.getIgnoreRepaint() , getInputContext sample code for java.awt.Component.getInputContext() definition code for java.awt.Component.getInputContext() , getInputMethodListeners sample code for java.awt.Component.getInputMethodListeners() definition code for java.awt.Component.getInputMethodListeners() , getInputMethodRequests sample code for java.awt.Component.getInputMethodRequests() definition code for java.awt.Component.getInputMethodRequests() , getKeyListeners sample code for java.awt.Component.getKeyListeners() definition code for java.awt.Component.getKeyListeners() , getLocale sample code for java.awt.Component.getLocale() definition code for java.awt.Component.getLocale() , getLocation sample code for java.awt.Component.getLocation() definition code for java.awt.Component.getLocation() , getLocation sample code for java.awt.Component.getLocation(java.awt.Point) definition code for java.awt.Component.getLocation(java.awt.Point) , getLocationOnScreen sample code for java.awt.Component.getLocationOnScreen() definition code for java.awt.Component.getLocationOnScreen() , getMouseListeners sample code for java.awt.Component.getMouseListeners() definition code for java.awt.Component.getMouseListeners() , getMouseMotionListeners sample code for java.awt.Component.getMouseMotionListeners() definition code for java.awt.Component.getMouseMotionListeners() , getMousePosition sample code for java.awt.Component.getMousePosition() definition code for java.awt.Component.getMousePosition() , getMouseWheelListeners sample code for java.awt.Component.getMouseWheelListeners() definition code for java.awt.Component.getMouseWheelListeners() , getName sample code for java.awt.Component.getName() definition code for java.awt.Component.getName() , getParent sample code for java.awt.Component.getParent() definition code for java.awt.Component.getParent() , getPeer sample code for java.awt.Component.getPeer() definition code for java.awt.Component.getPeer() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners() definition code for java.awt.Component.getPropertyChangeListeners() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners(java.lang.String) definition code for java.awt.Component.getPropertyChangeListeners(java.lang.String) , getSize sample code for java.awt.Component.getSize() definition code for java.awt.Component.getSize() , getSize sample code for java.awt.Component.getSize(java.awt.Dimension) definition code for java.awt.Component.getSize(java.awt.Dimension) , getToolkit sample code for java.awt.Component.getToolkit() definition code for java.awt.Component.getToolkit() , getTreeLock sample code for java.awt.Component.getTreeLock() definition code for java.awt.Component.getTreeLock() , getWidth sample code for java.awt.Component.getWidth() definition code for java.awt.Component.getWidth() , getX sample code for java.awt.Component.getX() definition code for java.awt.Component.getX() , getY sample code for java.awt.Component.getY() definition code for java.awt.Component.getY() , gotFocus sample code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) , handleEvent sample code for java.awt.Component.handleEvent(java.awt.Event) definition code for java.awt.Component.handleEvent(java.awt.Event) , hasFocus sample code for java.awt.Component.hasFocus() definition code for java.awt.Component.hasFocus() , hide sample code for java.awt.Component.hide() definition code for java.awt.Component.hide() , imageUpdate sample code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) , inside sample code for java.awt.Component.inside(int, int) definition code for java.awt.Component.inside(int, int) , isBackgroundSet sample code for java.awt.Component.isBackgroundSet() definition code for java.awt.Component.isBackgroundSet() , isCursorSet sample code for java.awt.Component.isCursorSet() definition code for java.awt.Component.isCursorSet() , isDisplayable sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable() , isDoubleBuffered sample code for java.awt.Component.isDoubleBuffered() definition code for java.awt.Component.isDoubleBuffered() , isEnabled sample code for java.awt.Component.isEnabled() definition code for java.awt.Component.isEnabled() , isFocusable sample code for java.awt.Component.isFocusable() definition code for java.awt.Component.isFocusable() , isFocusOwner sample code for java.awt.Component.isFocusOwner() definition code for java.awt.Component.isFocusOwner() , isFocusTraversable sample code for java.awt.Component.isFocusTraversable() definition code for java.awt.Component.isFocusTraversable() , isFontSet sample code for java.awt.Component.isFontSet() definition code for java.awt.Component.isFontSet() , isForegroundSet sample code for java.awt.Component.isForegroundSet() definition code for java.awt.Component.isForegroundSet() , isLightweight sample code for java.awt.Component.isLightweight() definition code for java.awt.Component.isLightweight() , isMaximumSizeSet sample code for java.awt.Component.isMaximumSizeSet() definition code for java.awt.Component.isMaximumSizeSet() , isMinimumSizeSet sample code for java.awt.Component.isMinimumSizeSet() definition code for java.awt.Component.isMinimumSizeSet() , isOpaque sample code for java.awt.Component.isOpaque() definition code for java.awt.Component.isOpaque() , isPreferredSizeSet sample code for java.awt.Component.isPreferredSizeSet() definition code for java.awt.Component.isPreferredSizeSet() , isShowing sample code for java.awt.Component.isShowing() definition code for java.awt.Component.isShowing() , isValid sample code for java.awt.Component.isValid() definition code for java.awt.Component.isValid() , isVisible sample code for java.awt.Component.isVisible() definition code for java.awt.Component.isVisible() , keyDown sample code for java.awt.Component.keyDown(java.awt.Event, int) definition code for java.awt.Component.keyDown(java.awt.Event, int) , keyUp sample code for java.awt.Component.keyUp(java.awt.Event, int) definition code for java.awt.Component.keyUp(java.awt.Event, int) , list sample code for java.awt.Component.list() definition code for java.awt.Component.list() , list sample code for java.awt.Component.list(java.io.PrintStream) definition code for java.awt.Component.list(java.io.PrintStream) , list sample code for java.awt.Component.list(java.io.PrintWriter) definition code for java.awt.Component.list(java.io.PrintWriter) , location sample code for java.awt.Component.location() definition code for java.awt.Component.location() , lostFocus sample code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) , mouseDown sample code for java.awt.Component.mouseDown(java.awt.Event, int, int) definition code for java.awt.Component.mouseDown(java.awt.Event, int, int) , mouseDrag sample code for java.awt.Component.mouseDrag(java.awt.Event, int, int) definition code for java.awt.Component.mouseDrag(java.awt.Event, int, int) , mouseEnter sample code for java.awt.Component.mouseEnter(java.awt.Event, int, int) definition code for java.awt.Component.mouseEnter(java.awt.Event, int, int) , mouseExit sample code for java.awt.Component.mouseExit(java.awt.Event, int, int) definition code for java.awt.Component.mouseExit(java.awt.Event, int, int) , mouseMove sample code for java.awt.Component.mouseMove(java.awt.Event, int, int) definition code for java.awt.Component.mouseMove(java.awt.Event, int, int) , mouseUp sample code for java.awt.Component.mouseUp(java.awt.Event, int, int) definition code for java.awt.Component.mouseUp(java.awt.Event, int, int) , move sample code for java.awt.Component.move(int, int) definition code for java.awt.Component.move(int, int) , nextFocus sample code for java.awt.Component.nextFocus() definition code for java.awt.Component.nextFocus() , paintAll sample code for java.awt.Component.paintAll(java.awt.Graphics) definition code for java.awt.Component.paintAll(java.awt.Graphics) , postEvent sample code for java.awt.Component.postEvent(java.awt.Event) definition code for java.awt.Component.postEvent(java.awt.Event) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , printAll sample code for java.awt.Component.printAll(java.awt.Graphics) definition code for java.awt.Component.printAll(java.awt.Graphics) , processComponentEvent sample code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) definition code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) , processFocusEvent sample code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) definition code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) , processHierarchyBoundsEvent sample code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) , processHierarchyEvent sample code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) , processInputMethodEvent sample code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) definition code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) , processKeyEvent sample code for java.awt.Component.processKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.Component.processKeyEvent(java.awt.event.KeyEvent) , processMouseEvent sample code for java.awt.Component.processMouseEvent(java.awt.event.MouseEvent) definition code for java.awt.Component.processMouseEvent(java.awt.event.MouseEvent) , processMouseMotionEvent sample code for java.awt.Component.processMouseMotionEvent(java.awt.event.MouseEvent) definition code for java.awt.Component.processMouseMotionEvent(java.awt.event.MouseEvent) , processMouseWheelEvent sample code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) definition code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) , remove sample code for java.awt.Component.remove(java.awt.MenuComponent) definition code for java.awt.Component.remove(java.awt.MenuComponent) , removeComponentListener sample code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) , removeFocusListener sample code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) , removeHierarchyBoundsListener sample code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , removeHierarchyListener sample code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) , removeInputMethodListener sample code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) , removeKeyListener sample code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) , removeMouseListener sample code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) , removeMouseMotionListener sample code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) , removeMouseWheelListener sample code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , repaint sample code for java.awt.Component.repaint() definition code for java.awt.Component.repaint() , repaint sample code for java.awt.Component.repaint(int, int, int, int) definition code for java.awt.Component.repaint(int, int, int, int) , repaint sample code for java.awt.Component.repaint(long) definition code for java.awt.Component.repaint(long) , repaint sample code for java.awt.Component.repaint(long, int, int, int, int) definition code for java.awt.Component.repaint(long, int, int, int, int) , requestFocus sample code for java.awt.Component.requestFocus() definition code for java.awt.Component.requestFocus() , requestFocus sample code for java.awt.Component.requestFocus(boolean) definition code for java.awt.Component.requestFocus(boolean) , requestFocusInWindow sample code for java.awt.Component.requestFocusInWindow() definition code for java.awt.Component.requestFocusInWindow() , requestFocusInWindow sample code for java.awt.Component.requestFocusInWindow(boolean) definition code for java.awt.Component.requestFocusInWindow(boolean) , reshape sample code for java.awt.Component.reshape(int, int, int, int) definition code for java.awt.Component.reshape(int, int, int, int) , resize sample code for java.awt.Component.resize(java.awt.Dimension) definition code for java.awt.Component.resize(java.awt.Dimension) , resize sample code for java.awt.Component.resize(int, int) definition code for java.awt.Component.resize(int, int) , setBackground sample code for java.awt.Component.setBackground(java.awt.Color) definition code for java.awt.Component.setBackground(java.awt.Color) , setBounds sample code for java.awt.Component.setBounds(int, int, int, int) definition code for java.awt.Component.setBounds(int, int, int, int) , setBounds sample code for java.awt.Component.setBounds(java.awt.Rectangle) definition code for java.awt.Component.setBounds(java.awt.Rectangle) , setComponentOrientation sample code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) , setCursor sample code for java.awt.Component.setCursor(java.awt.Cursor) definition code for java.awt.Component.setCursor(java.awt.Cursor) , setDropTarget sample code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) definition code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) , setEnabled sample code for java.awt.Component.setEnabled(boolean) definition code for java.awt.Component.setEnabled(boolean) , setFocusable sample code for java.awt.Component.setFocusable(boolean) definition code for java.awt.Component.setFocusable(boolean) , setFocusTraversalKeysEnabled sample code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) definition code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) , setForeground sample code for java.awt.Component.setForeground(java.awt.Color) definition code for java.awt.Component.setForeground(java.awt.Color) , setIgnoreRepaint sample code for java.awt.Component.setIgnoreRepaint(boolean) definition code for java.awt.Component.setIgnoreRepaint(boolean) , setLocale sample code for java.awt.Component.setLocale(java.util.Locale) definition code for java.awt.Component.setLocale(java.util.Locale) , setLocation sample code for java.awt.Component.setLocation(int, int) definition code for java.awt.Component.setLocation(int, int) , setLocation sample code for java.awt.Component.setLocation(java.awt.Point) definition code for java.awt.Component.setLocation(java.awt.Point) , setMaximumSize sample code for java.awt.Component.setMaximumSize(java.awt.Dimension) definition code for java.awt.Component.setMaximumSize(java.awt.Dimension) , setMinimumSize sample code for java.awt.Component.setMinimumSize(java.awt.Dimension) definition code for java.awt.Component.setMinimumSize(java.awt.Dimension) , setName sample code for java.awt.Component.setName(java.lang.String) definition code for java.awt.Component.setName(java.lang.String) , setPreferredSize sample code for java.awt.Component.setPreferredSize(java.awt.Dimension) definition code for java.awt.Component.setPreferredSize(java.awt.Dimension) , setSize sample code for java.awt.Component.setSize(java.awt.Dimension) definition code for java.awt.Component.setSize(java.awt.Dimension) , setSize sample code for java.awt.Component.setSize(int, int) definition code for java.awt.Component.setSize(int, int) , setVisible sample code for java.awt.Component.setVisible(boolean) definition code for java.awt.Component.setVisible(boolean) , show sample code for java.awt.Component.show() definition code for java.awt.Component.show() , show sample code for java.awt.Component.show(boolean) definition code for java.awt.Component.show(boolean) , size sample code for java.awt.Component.size() definition code for java.awt.Component.size() , toString sample code for java.awt.Component.toString() definition code for java.awt.Component.toString() , transferFocus sample code for java.awt.Component.transferFocus() definition code for java.awt.Component.transferFocus() , transferFocusUpCycle sample code for java.awt.Component.transferFocusUpCycle() definition code for java.awt.Component.transferFocusUpCycle()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

Container sample code for java.awt.Container() definition code for java.awt.Container()

public Container()
Constructs a new Container. Containers can be extended directly, but are lightweight in this case and must be contained by a parent somewhere higher up in the component tree that is native. (such as Frame for example).

Method Detail

getComponentCount sample code for java.awt.Container.getComponentCount() definition code for java.awt.Container.getComponentCount()

public int getComponentCount()
Gets the number of components in this panel.

Returns:
the number of components in this panel.
Since:
JDK1.1
See Also:
getComponent(int) sample code for java.awt.Container.getComponent(int) definition code for java.awt.Container.getComponent(int)

countComponents sample code for java.awt.Container.countComponents() definition code for java.awt.Container.countComponents()

@Deprecated
public int countComponents()
Deprecated. As of JDK version 1.1, replaced by getComponentCount().


getComponent sample code for java.awt.Container.getComponent(int) definition code for java.awt.Container.getComponent(int)

public Component sample code for java.awt.Component definition code for java.awt.Component  getComponent(int n)
Gets the nth component in this container.

Parameters:
n - the index of the component to get.
Returns:
the nth component in this container.
Throws:
ArrayIndexOutOfBoundsException sample code for java.lang.ArrayIndexOutOfBoundsException definition code for java.lang.ArrayIndexOutOfBoundsException - if the nth value does not exist.

getComponents sample code for java.awt.Container.getComponents() definition code for java.awt.Container.getComponents()

public Component sample code for java.awt.Component definition code for java.awt.Component [] getComponents()
Gets all the components in this container.

Returns:
an array of all the components in this container.

getInsets sample code for java.awt.Container.getInsets() definition code for java.awt.Container.getInsets()

public Insets sample code for java.awt.Insets definition code for java.awt.Insets  getInsets()
Determines the insets of this container, which indicate the size of the container's border.

A Frame object, for example, has a top inset that corresponds to the height of the frame's title bar.

Returns:
the insets of this container.
Since:
JDK1.1
See Also:
Insets sample code for java.awt.Insets definition code for java.awt.Insets , LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager

insets sample code for java.awt.Container.insets() definition code for java.awt.Container.insets()

@Deprecated
public Insets sample code for java.awt.Insets definition code for java.awt.Insets  insets()
Deprecated. As of JDK version 1.1, replaced by getInsets().


add sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component)

public Component sample code for java.awt.Component definition code for java.awt.Component  add(Component sample code for java.awt.Component definition code for java.awt.Component  comp)
Appends the specified component to the end of this container. This is a convenience method for addImpl(java.awt.Component, java.lang.Object, int) sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) .

Note: If a component has been added to a container that has been displayed, validate must be called on that container to display the new component. If multiple components are being added, you can improve efficiency by calling validate only once, after all the components have been added.

Parameters:
comp - the component to be added
Returns:
the component argument
See Also:
addImpl(java.awt.Component, java.lang.Object, int) sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) , validate() sample code for java.awt.Container.validate() definition code for java.awt.Container.validate() , JComponent.revalidate() sample code for javax.swing.JComponent.revalidate() definition code for javax.swing.JComponent.revalidate()

add sample code for java.awt.Container.add(java.lang.String, java.awt.Component) definition code for java.awt.Container.add(java.lang.String, java.awt.Component)

public Component sample code for java.awt.Component definition code for java.awt.Component  add(String sample code for java.lang.String definition code for java.lang.String  name,
                     Component sample code for java.awt.Component definition code for java.awt.Component  comp)
Adds the specified component to this container. This is a convenience method for addImpl(java.awt.Component, java.lang.Object, int) sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) .

This method is obsolete as of 1.1. Please use the method add(Component, Object) instead.

See Also:
add(Component, Object) sample code for java.awt.Container.add(java.awt.Component, java.lang.Object) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object)

add sample code for java.awt.Container.add(java.awt.Component, int) definition code for java.awt.Container.add(java.awt.Component, int)

public Component sample code for java.awt.Component definition code for java.awt.Component  add(Component sample code for java.awt.Component definition code for java.awt.Component  comp,
                     int index)
Adds the specified component to this container at the given position. This is a convenience method for addImpl(java.awt.Component, java.lang.Object, int) sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) .

Note: If a component has been added to a container that has been displayed, validate must be called on that container to display the new component. If multiple components are being added, you can improve efficiency by calling validate only once, after all the components have been added.

Parameters:
comp - the component to be added
index - the position at which to insert the component, or -1 to append the component to the end
Returns:
the component comp
See Also:
addImpl(java.awt.Component, java.lang.Object, int) sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) , remove(int) sample code for java.awt.Container.remove(int) definition code for java.awt.Container.remove(int) , validate() sample code for java.awt.Container.validate() definition code for java.awt.Container.validate() , JComponent.revalidate() sample code for javax.swing.JComponent.revalidate() definition code for javax.swing.JComponent.revalidate()

setComponentZOrder sample code for java.awt.Container.setComponentZOrder(java.awt.Component, int) definition code for java.awt.Container.setComponentZOrder(java.awt.Component, int)

public final void setComponentZOrder(Component sample code for java.awt.Component definition code for java.awt.Component  comp,
                                     int index)
Moves the specified component to the specified z-order index in the container. The z-order determines the order that components are painted; the component with the highest z-order paints first and the component with the lowest z-order paints last. Where components overlap, the component with the lower z-order paints over the component with the higher z-order.

If the component is a child of some other container, it is removed from that container before being added to this container. The important difference between this method and java.awt.Container.add(Component, int) is that this method doesn't call removeNotify on the component while removing it from its previous container unless necessary and when allowed by the underlying native windowing system. This way, if the component has the keyboard focus, it maintains the focus when moved to the new position.

This property is guaranteed to apply only to lightweight non-Container components.

Note: Not all platforms support changing the z-order of heavyweight components from one container into another without the call to removeNotify. There is no way to detect whether a platform supports this, so developers shouldn't make any assumptions.

Parameters:
comp - the component to be moved
index - the position in the container's list to insert the component, where getComponentCount() appends to the end
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if comp is null
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if comp is one of the container's parents
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if index is not in the range [0, getComponentCount()] for moving between containers, or not in the range [0, getComponentCount()-1] for moving inside a container
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if adding a container to itself
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if adding a Window to a container
Since:
1.5
See Also:
getComponentZOrder(java.awt.Component) sample code for java.awt.Container.getComponentZOrder(java.awt.Component) definition code for java.awt.Container.getComponentZOrder(java.awt.Component)

getComponentZOrder sample code for java.awt.Container.getComponentZOrder(java.awt.Component) definition code for java.awt.Container.getComponentZOrder(java.awt.Component)

public final int getComponentZOrder(Component sample code for java.awt.Component definition code for java.awt.Component  comp)
Returns the z-order index of the component inside the container. The higher a component is in the z-order hierarchy, the lower its index. The component with the lowest z-order index is painted last, above all other child components.

Parameters:
comp - the component being queried
Returns:
the z-order index of the component; otherwise returns -1 if the component is nullSince:
1.5
See Also:
setComponentZOrder(java.awt.Component, int) sample code for java.awt.Container.setComponentZOrder(java.awt.Component, int) definition code for java.awt.Container.setComponentZOrder(java.awt.Component, int)

add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object)

public void add(Component sample code for java.awt.Component definition code for java.awt.Component  comp,
                Object sample code for java.lang.Object definition code for java.lang.Object  constraints)
Adds the specified component to the end of this container. Also notifies the layout manager to add the component to this container's layout using the specified constraints object. This is a convenience method for addImpl(java.awt.Component, java.lang.Object, int) sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) .

Note: If a component has been added to a container that has been displayed, validate must be called on that container to display the new component. If multiple components are being added, you can improve efficiency by calling validate only once, after all the components have been added.

Parameters:
comp - the component to be added
constraints - an object expressing layout contraints for this component
Since:
JDK1.1
See Also:
addImpl(java.awt.Component, java.lang.Object, int) sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) , validate() sample code for java.awt.Container.validate() definition code for java.awt.Container.validate() , JComponent.revalidate() sample code for javax.swing.JComponent.revalidate() definition code for javax.swing.JComponent.revalidate() , LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager

add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object, int)

public void add(Component sample code for java.awt.Component definition code for java.awt.Component  comp,
                Object sample code for java.lang.Object definition code for java.lang.Object  constraints,
                int index)
Adds the specified component to this container with the specified constraints at the specified index. Also notifies the layout manager to add the component to the this container's layout using the specified constraints object. This is a convenience method for addImpl(java.awt.Component, java.lang.Object, int) sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) .

Note: If a component has been added to a container that has been displayed, validate must be called on that container to display the new component. If multiple components are being added, you can improve efficiency by calling validate only once, after all the components have been added.

Parameters:
comp - the component to be added
constraints - an object expressing layout contraints for this
index - the position in the container's list at which to insert the component; -1 means insert at the end component
See Also:
addImpl(java.awt.Component, java.lang.Object, int) sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) , validate() sample code for java.awt.Container.validate() definition code for java.awt.Container.validate() , JComponent.revalidate() sample code for javax.swing.JComponent.revalidate() definition code for javax.swing.JComponent.revalidate() , remove(int) sample code for java.awt.Container.remove(int) definition code for java.awt.Container.remove(int) , LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager

addImpl sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int)

protected void addImpl(Component sample code for java.awt.Component definition code for java.awt.Component  comp,
                       Object sample code for java.lang.Object definition code for java.lang.Object  constraints,
                       int index)
Adds the specified component to this container at the specified index. This method also notifies the layout manager to add the component to this container's layout using the specified constraints object via the addLayoutComponent method.

The constraints are defined by the particular layout manager being used. For example, the BorderLayout class defines five constraints: BorderLayout.NORTH, BorderLayout.SOUTH, BorderLayout.EAST, BorderLayout.WEST, and BorderLayout.CENTER.

The GridBagLayout class requires a GridBagConstraints object. Failure to pass the correct type of constraints object results in an IllegalArgumentException.

If the layout manager implements both the LayoutManager and LayoutManager2 interfaces, the LayoutManager2 methods are called.

Note that if the component already exists in this container or a child of this container, it is removed from that container before being added to this container.

This is the method to override if a program needs to track every add request to a container as all other add methods defer to this one. An overriding method should usually include a call to the superclass's version of the method:

super.addImpl(comp, constraints, index)

Parameters:
comp - the component to be added
constraints - an object expressing layout constraints for this component
index - the position in the container's list at which to insert the component, where -1 means append to the end
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if index is invalid
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if adding the container's parent to itself
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if comp has been added to the Container more than once
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if adding a window to a container
Since:
JDK1.1
See Also:
add(Component) sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component) , add(Component, int) sample code for java.awt.Container.add(java.awt.Component, int) definition code for java.awt.Container.add(java.awt.Component, int) , add(Component, java.lang.Object) sample code for java.awt.Container.add(java.awt.Component, java.lang.Object) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object) , LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager , LayoutManager2 sample code for java.awt.LayoutManager2 definition code for java.awt.LayoutManager2

remove sample code for java.awt.Container.remove(int) definition code for java.awt.Container.remove(int)

public void remove(int index)
Removes the component, specified by index, from this container. This method also notifies the layout manager to remove the component from this container's layout via the removeLayoutComponent method.

Parameters:
index - the index of the component to be removed
Since:
JDK1.1
See Also:
add(java.awt.Component) sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component)

remove sample code for java.awt.Container.remove(java.awt.Component) definition code for java.awt.Container.remove(java.awt.Component)

public void remove(Component sample code for java.awt.Component definition code for java.awt.Component  comp)
Removes the specified component from this container. This method also notifies the layout manager to remove the component from this container's layout via the removeLayoutComponent method.

Parameters:
comp - the component to be removed
See Also:
add(java.awt.Component) sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component) , remove(int) sample code for java.awt.Container.remove(int) definition code for java.awt.Container.remove(int)

removeAll sample code for java.awt.Container.removeAll() definition code for java.awt.Container.removeAll()

public void removeAll()
Removes all the components from this container. This method also notifies the layout manager to remove the components from this container's layout via the removeLayoutComponent method.

See Also:
add(java.awt.Component) sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component) , remove(int) sample code for java.awt.Container.remove(int) definition code for java.awt.Container.remove(int)

getLayout sample code for java.awt.Container.getLayout() definition code for java.awt.Container.getLayout()

public LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager  getLayout()
Gets the layout manager for this container.

See Also:
doLayout() sample code for java.awt.Container.doLayout() definition code for java.awt.Container.doLayout() , setLayout(java.awt.LayoutManager) sample code for java.awt.Container.setLayout(java.awt.LayoutManager) definition code for java.awt.Container.setLayout(java.awt.LayoutManager)

setLayout sample code for java.awt.Container.setLayout(java.awt.LayoutManager) definition code for java.awt.Container.setLayout(java.awt.LayoutManager)

public void setLayout(LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager  mgr)
Sets the layout manager for this container.

Parameters:
mgr - the specified layout manager
See Also:
doLayout() sample code for java.awt.Container.doLayout() definition code for java.awt.Container.doLayout() , getLayout() sample code for java.awt.Container.getLayout() definition code for java.awt.Container.getLayout()

doLayout sample code for java.awt.Container.doLayout() definition code for java.awt.Container.doLayout()

public void doLayout()
Causes this container to lay out its components. Most programs should not call this method directly, but should invoke the validate method instead.

Overrides:
doLayout sample code for java.awt.Component.doLayout() definition code for java.awt.Component.doLayout() in class Component sample code for java.awt.Component definition code for java.awt.Component
Since:
JDK1.1
See Also:
LayoutManager.layoutContainer(java.awt.Container) sample code for java.awt.LayoutManager.layoutContainer(java.awt.Container) definition code for java.awt.LayoutManager.layoutContainer(java.awt.Container) , setLayout(java.awt.LayoutManager) sample code for java.awt.Container.setLayout(java.awt.LayoutManager) definition code for java.awt.Container.setLayout(java.awt.LayoutManager) , validate() sample code for java.awt.Container.validate() definition code for java.awt.Container.validate()

layout sample code for java.awt.Container.layout() definition code for java.awt.Container.layout()

@Deprecated
public void layout()
Deprecated. As of JDK version 1.1, replaced by doLayout().

Overrides:
layout sample code for java.awt.Component.layout() definition code for java.awt.Component.layout() in class Component sample code for java.awt.Component definition code for java.awt.Component

invalidate sample code for java.awt.Container.invalidate() definition code for java.awt.Container.invalidate()

public void invalidate()
Invalidates the container. The container and all parents above it are marked as needing to be laid out. This method can be called often, so it needs to execute quickly.

Overrides:
invalidate sample code for java.awt.Component.invalidate() definition code for java.awt.Component.invalidate() in class Component sample code for java.awt.Component definition code for java.awt.Component
See Also:
validate() sample code for java.awt.Container.validate() definition code for java.awt.Container.validate() , layout() sample code for java.awt.Container.layout() definition code for java.awt.Container.layout() , LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager

validate sample code for java.awt.Container.validate() definition code for java.awt.Container.validate()

public void validate()
Validates this container and all of its subcomponents.

The validate method is used to cause a container to lay out its subcomponents again. It should be invoked when this container's subcomponents are modified (added to or removed from the container, or layout-related information changed) after the container has been displayed.

Overrides:
validate sample code for java.awt.Component.validate() definition code for java.awt.Component.validate() in class Component sample code for java.awt.Component definition code for java.awt.Component
See Also:
add(java.awt.Component) sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component) , Component.invalidate() sample code for java.awt.Component.invalidate() definition code for java.awt.Component.invalidate() , JComponent.revalidate() sample code for javax.swing.JComponent.revalidate() definition code for javax.swing.JComponent.revalidate()

validateTree sample code for java.awt.Container.validateTree() definition code for java.awt.Container.validateTree()

protected void validateTree()
Recursively descends the container tree and recomputes the layout for any subtrees marked as needing it (those marked as invalid). Synchronization should be provided by the method that calls this one: validate.


setFont sample code for java.awt.Container.setFont(java.awt.Font) definition code for java.awt.Container.setFont(java.awt.Font)

public void setFont(Font sample code for java.awt.Font definition code for java.awt.Font  f)
Sets the font of this container.

Overrides:
setFont sample code for java.awt.Component.setFont(java.awt.Font) definition code for java.awt.Component.setFont(java.awt.Font) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
f - The font to become this container's font.
Since:
JDK1.0
See Also:
Component.getFont() sample code for java.awt.Component.getFont() definition code for java.awt.Component.getFont()

getPreferredSize sample code for java.awt.Container.getPreferredSize() definition code for java.awt.Container.getPreferredSize()

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredSize()
Returns the preferred size of this container.

Overrides:
getPreferredSize sample code for java.awt.Component.getPreferredSize() definition code for java.awt.Component.getPreferredSize() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
an instance of Dimension that represents the preferred size of this container.
See Also:
getMinimumSize() sample code for java.awt.Container.getMinimumSize() definition code for java.awt.Container.getMinimumSize() , getLayout() sample code for java.awt.Container.getLayout() definition code for java.awt.Container.getLayout() , LayoutManager.preferredLayoutSize(Container) sample code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) , Component.getPreferredSize() sample code for java.awt.Component.getPreferredSize() definition code for java.awt.Component.getPreferredSize()

preferredSize sample code for java.awt.Container.preferredSize() definition code for java.awt.Container.preferredSize()

@Deprecated
public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().

Overrides:
preferredSize sample code for java.awt.Component.preferredSize() definition code for java.awt.Component.preferredSize() in class Component sample code for java.awt.Component definition code for java.awt.Component

getMinimumSize sample code for java.awt.Container.getMinimumSize() definition code for java.awt.Container.getMinimumSize()

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMinimumSize()
Returns the minimum size of this container.

Overrides:
getMinimumSize sample code for java.awt.Component.getMinimumSize() definition code for java.awt.Component.getMinimumSize() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
an instance of Dimension that represents the minimum size of this container.
Since:
JDK1.1
See Also:
getPreferredSize() sample code for java.awt.Container.getPreferredSize() definition code for java.awt.Container.getPreferredSize() , getLayout() sample code for java.awt.Container.getLayout() definition code for java.awt.Container.getLayout() , LayoutManager.minimumLayoutSize(Container) sample code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) , Component.getMinimumSize() sample code for java.awt.Component.getMinimumSize() definition code for java.awt.Component.getMinimumSize()

minimumSize sample code for java.awt.Container.minimumSize() definition code for java.awt.Container.minimumSize()

@Deprecated
public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().

Overrides:
minimumSize sample code for java.awt.Component.minimumSize() definition code for java.awt.Component.minimumSize() in class Component sample code for java.awt.Component definition code for java.awt.Component

getMaximumSize sample code for java.awt.Container.getMaximumSize() definition code for java.awt.Container.getMaximumSize()

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMaximumSize()
Returns the maximum size of this container.

Overrides:
getMaximumSize sample code for java.awt.Component.getMaximumSize() definition code for java.awt.Component.getMaximumSize() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
a dimension object indicating this component's maximum size
See Also:
getPreferredSize() sample code for java.awt.Container.getPreferredSize() definition code for java.awt.Container.getPreferredSize()

getAlignmentX sample code for java.awt.Container.getAlignmentX() definition code for java.awt.Container.getAlignmentX()

public float getAlignmentX()
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

Overrides:
getAlignmentX sample code for java.awt.Component.getAlignmentX() definition code for java.awt.Component.getAlignmentX() in class Component sample code for java.awt.Component definition code for java.awt.Component

getAlignmentY sample code for java.awt.Container.getAlignmentY() definition code for java.awt.Container.getAlignmentY()

public float getAlignmentY()
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

Overrides:
getAlignmentY sample code for java.awt.Component.getAlignmentY() definition code for java.awt.Component.getAlignmentY() in class Component sample code for java.awt.Component definition code for java.awt.Component

paint sample code for java.awt.Container.paint(java.awt.Graphics) definition code for java.awt.Container.paint(java.awt.Graphics)

public void paint(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
Paints the container. This forwards the paint to any lightweight components that are children of this container. If this method is reimplemented, super.paint(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, paint() will not be forwarded to that child.

Overrides:
paint sample code for java.awt.Component.paint(java.awt.Graphics) definition code for java.awt.Component.paint(java.awt.Graphics) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
g - the specified Graphics window
See Also:
Component.update(Graphics) sample code for java.awt.Component.update(java.awt.Graphics) definition code for java.awt.Component.update(java.awt.Graphics)

update sample code for java.awt.Container.update(java.awt.Graphics) definition code for java.awt.Container.update(java.awt.Graphics)

public void update(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
Updates the container. This forwards the update to any lightweight components that are children of this container. If this method is reimplemented, super.update(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, update() will not be forwarded to that child.

Overrides:
update sample code for java.awt.Component.update(java.awt.Graphics) definition code for java.awt.Component.update(java.awt.Graphics) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
g - the specified Graphics window
See Also:
Component.update(Graphics) sample code for java.awt.Component.update(java.awt.Graphics) definition code for java.awt.Component.update(java.awt.Graphics)

print sample code for java.awt.Container.print(java.awt.Graphics) definition code for java.awt.Container.print(java.awt.Graphics)

public void print(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
Prints the container. This forwards the print to any lightweight components that are children of this container. If this method is reimplemented, super.print(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, print() will not be forwarded to that child.

Overrides:
print sample code for java.awt.Component.print(java.awt.Graphics) definition code for java.awt.Component.print(java.awt.Graphics) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
g - the specified Graphics window
See Also:
Component.update(Graphics) sample code for java.awt.Component.update(java.awt.Graphics) definition code for java.awt.Component.update(java.awt.Graphics)

paintComponents sample code for java.awt.Container.paintComponents(java.awt.Graphics) definition code for java.awt.Container.paintComponents(java.awt.Graphics)

public void paintComponents(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
Paints each of the components in this container.

Parameters:
g - the graphics context.
See Also:
Component.paint(java.awt.Graphics) sample code for java.awt.Component.paint(java.awt.Graphics) definition code for java.awt.Component.paint(java.awt.Graphics) , Component.paintAll(java.awt.Graphics) sample code for java.awt.Component.paintAll(java.awt.Graphics) definition code for java.awt.Component.paintAll(java.awt.Graphics)

printComponents sample code for java.awt.Container.printComponents(java.awt.Graphics) definition code for java.awt.Container.printComponents(java.awt.Graphics)

public void printComponents(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
Prints each of the components in this container.

Parameters:
g - the graphics context.
See Also:
Component.print(java.awt.Graphics) sample code for java.awt.Component.print(java.awt.Graphics) definition code for java.awt.Component.print(java.awt.Graphics) , Component.printAll(java.awt.Graphics) sample code for java.awt.Component.printAll(java.awt.Graphics) definition code for java.awt.Component.printAll(java.awt.Graphics)

addContainerListener sample code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener)

public void addContainerListener(ContainerListener sample code for java.awt.event.ContainerListener definition code for java.awt.event.ContainerListener  l)
Adds the specified container listener to receive container events from this container. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the container listener
See Also:
removeContainerListener(java.awt.event.ContainerListener) sample code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) , getContainerListeners() sample code for java.awt.Container.getContainerListeners() definition code for java.awt.Container.getContainerListeners()

removeContainerListener sample code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener)

public void removeContainerListener(ContainerListener sample code for java.awt.event.ContainerListener definition code for java.awt.event.ContainerListener  l)
Removes the specified container listener so it no longer receives container events from this container. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the container listener
See Also:
addContainerListener(java.awt.event.ContainerListener) sample code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) , getContainerListeners() sample code for java.awt.Container.getContainerListeners() definition code for java.awt.Container.getContainerListeners()

getContainerListeners sample code for java.awt.Container.getContainerListeners() definition code for java.awt.Container.getContainerListeners()

public ContainerListener sample code for java.awt.event.ContainerListener definition code for java.awt.event.ContainerListener [] getContainerListeners()
Returns an array of all the container listeners registered on this container.

Returns:
all of this container's ContainerListeners or an empty array if no container listeners are currently registered
Since:
1.4
See Also:
addContainerListener(java.awt.event.ContainerListener) sample code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) , removeContainerListener(java.awt.event.ContainerListener) sample code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener)

getListeners sample code for java.awt.Container.<T extends java.util.EventListener>getListeners(java.lang.Class<T>) definition code for java.awt.Container.<T extends java.util.EventListener>getListeners(java.lang.Class<T>)

public <T extends EventListener sample code for java.util.EventListener definition code for java.util.EventListener > T[] getListeners(Class sample code for java.lang.Class definition code for java.lang.Class <T> listenerType)
Returns an array of all the objects currently registered as FooListeners upon this Container. FooListeners are registered using the addFooListener method.

You can specify the listenerType argument with a class literal, such as FooListener.class. For example, you can query a Container c for its container listeners with the following code:

ContainerListener[] cls = (ContainerListener[])(c.getListeners(ContainerListener.class));
If no such listeners exist, this method returns an empty array.

Overrides:
getListeners sample code for java.awt.Component.getListeners(java.lang.Class) definition code for java.awt.Component.getListeners(java.lang.Class) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
listenerType - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener
Returns:
an array of all objects registered as FooListeners on this container, or an empty array if no such listeners have been added
Throws:
ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener
Since:
1.3
See Also:
getContainerListeners() sample code for java.awt.Container.getContainerListeners() definition code for java.awt.Container.getContainerListeners()

processEvent sample code for java.awt.Container.processEvent(java.awt.AWTEvent) definition code for java.awt.Container.processEvent(java.awt.AWTEvent)

protected void processEvent(AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent  e)
Processes events on this container. If the event is a ContainerEvent, it invokes the processContainerEvent method, else it invokes its superclass's processEvent.

Note that if the event parameter is null the behavior is unspecified and may result in an exception.

Overrides:
processEvent sample code for java.awt.Component.processEvent(java.awt.AWTEvent) definition code for java.awt.Component.processEvent(java.awt.AWTEvent) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
e - the event
See Also:
Component.processComponentEvent(java.awt.event.ComponentEvent) sample code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) definition code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) , Component.processFocusEvent(java.awt.event.FocusEvent) sample code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) definition code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) , Component.processKeyEvent(java.awt.event.KeyEvent) sample code for java.awt.Component.processKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.Component.processKeyEvent(java.awt.event.KeyEvent) , Component.processMouseEvent(java.awt.event.MouseEvent) sample code for java.awt.Component.processMouseEvent(java.awt.event.MouseEvent) definition code for java.awt.Component.processMouseEvent(java.awt.event.MouseEvent) , Component.processMouseMotionEvent(java.awt.event.MouseEvent) sample code for java.awt.Component.processMouseMotionEvent(java.awt.event.MouseEvent) definition code for java.awt.Component.processMouseMotionEvent(java.awt.event.MouseEvent) , Component.processInputMethodEvent(java.awt.event.InputMethodEvent) sample code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) definition code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) , Component.processHierarchyEvent(java.awt.event.HierarchyEvent) sample code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) , Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) sample code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) definition code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent)

processContainerEvent sample code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent) definition code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent)

protected void processContainerEvent(ContainerEvent sample code for java.awt.event.ContainerEvent definition code for java.awt.event.ContainerEvent  e)
Processes container events occurring on this container by dispatching them to any registered ContainerListener objects. NOTE: This method will not be called unless container events are enabled for this component; this happens when one of the following occurs:

Note that if the event parameter is null the behavior is unspecified and may result in an exception.

Parameters:
e - the container event
See Also:
Component.enableEvents(long) sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long)

deliverEvent sample code for java.awt.Container.deliverEvent(java.awt.Event) definition code for java.awt.Container.deliverEvent(java.awt.Event)

@Deprecated
public void deliverEvent(Event sample code for java.awt.Event definition code for java.awt.Event  e)
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e)

Overrides:
deliverEvent sample code for java.awt.Component.deliverEvent(java.awt.Event) definition code for java.awt.Component.deliverEvent(java.awt.Event) in class Component sample code for java.awt.Component definition code for java.awt.Component

getComponentAt sample code for java.awt.Container.getComponentAt(int, int) definition code for java.awt.Container.getComponentAt(int, int)

public Component sample code for java.awt.Component definition code for java.awt.Component  getComponentAt(int x,
                                int y)
Locates the component that contains the x,y position. The top-most child component is returned in the case where there is overlap in the components. This is determined by finding the component closest to the index 0 that claims to contain the given point via Component.contains(), except that Components which have native peers take precedence over those which do not (i.e., lightweight Components).

Overrides:
getComponentAt sample code for java.awt.Component.getComponentAt(int, int) definition code for java.awt.Component.getComponentAt(int, int) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
x - the x coordinate
y - the y coordinate
Returns:
null if the component does not contain the position. If there is no child component at the requested point and the point is within the bounds of the container the container itself is returned; otherwise the top-most child is returned.
Since:
JDK1.1
See Also:
Component.contains(int, int) sample code for java.awt.Component.contains(int, int) definition code for java.awt.Component.contains(int, int)

locate sample code for java.awt.Container.locate(int, int) definition code for java.awt.Container.locate(int, int)

@Deprecated
public Component sample code for java.awt.Component definition code for java.awt.Component  locate(int x,
                                   int y)
Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).

Overrides:
locate sample code for java.awt.Component.locate(int, int) definition code for java.awt.Component.locate(int, int) in class Component sample code for java.awt.Component definition code for java.awt.Component

getComponentAt sample code for java.awt.Container.getComponentAt(java.awt.Point) definition code for java.awt.Container.getComponentAt(java.awt.Point)

public Component sample code for java.awt.Component definition code for java.awt.Component  getComponentAt(Point sample code for java.awt.Point definition code for java.awt.Point  p)
Gets the component that contains the specified point.

Overrides:
getComponentAt sample code for java.awt.Component.getComponentAt(java.awt.Point) definition code for java.awt.Component.getComponentAt(java.awt.Point) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
p - the point.
Returns:
returns the component that contains the point, or null if the component does not contain the point.
Since:
JDK1.1
See Also:
Component.contains(int, int) sample code for java.awt.Component.contains(int, int) definition code for java.awt.Component.contains(int, int)

getMousePosition sample code for java.awt.Container.getMousePosition(boolean) definition code for java.awt.Container.getMousePosition(boolean)

public Point sample code for java.awt.Point definition code for java.awt.Point  getMousePosition(boolean allowChildren)
                       throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Returns the position of the mouse pointer in this Container's coordinate space if the Container is under the mouse pointer, otherwise returns null. This method is similar to Component.getMousePosition() sample code for java.awt.Component.getMousePosition() definition code for java.awt.Component.getMousePosition() with the exception that it can take the Container's children into account. If allowChildren is false, this method will return a non-null value only if the mouse pointer is above the Container directly, not above the part obscured by children. If allowChildren is true, this method returns a non-null value if the mouse pointer is above Container or any of its descendants.

Parameters:
allowChildren - true if children should be taken into account
Returns:
mouse coordinates relative to this Component, or null
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
1.5
See Also:
Component.getMousePosition() sample code for java.awt.Component.getMousePosition() definition code for java.awt.Component.getMousePosition()

findComponentAt sample code for java.awt.Container.findComponentAt(int, int) definition code for java.awt.Container.findComponentAt(int, int)

public Component sample code for java.awt.Component definition code for java.awt.Component  findComponentAt(int x,
                                 int y)
Locates the visible child component that contains the specified position. The top-most child component is returned in the case where there is overlap in the components. If the containing child component is a Container, this method will continue searching for the deepest nested child component. Components which are not visible are ignored during the search.

The findComponentAt method is different from getComponentAt in that getComponentAt only searches the Container's immediate children; if the containing component is a Container, findComponentAt will search that child to find a nested component.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
null if the component does not contain the position. If there is no child component at the requested point and the point is within the bounds of the container the container itself is returned.
Since:
1.2
See Also:
Component.contains(int, int) sample code for java.awt.Component.contains(int, int) definition code for java.awt.Component.contains(int, int) , getComponentAt(int, int) sample code for java.awt.Container.getComponentAt(int, int) definition code for java.awt.Container.getComponentAt(int, int)

findComponentAt sample code for java.awt.Container.findComponentAt(java.awt.Point) definition code for java.awt.Container.findComponentAt(java.awt.Point)

public Component sample code for java.awt.Component definition code for java.awt.Component  findComponentAt(Point sample code for java.awt.Point definition code for java.awt.Point  p)
Locates the visible child component that contains the specified point. The top-most child component is returned in the case where there is overlap in the components. If the containing child component is a Container, this method will continue searching for the deepest nested child component. Components which are not visible are ignored during the search.

The findComponentAt method is different from getComponentAt in that getComponentAt only searches the Container's immediate children; if the containing component is a Container, findComponentAt will search that child to find a nested component.

Parameters:
p - the point.
Returns:
null if the component does not contain the position. If there is no child component at the requested point and the point is within the bounds of the container the container itself is returned.
Since:
1.2
See Also:
Component.contains(int, int) sample code for java.awt.Component.contains(int, int) definition code for java.awt.Component.contains(int, int) , getComponentAt(int, int) sample code for java.awt.Container.getComponentAt(int, int) definition code for java.awt.Container.getComponentAt(int, int)

addNotify sample code for java.awt.Container.addNotify() definition code for java.awt.Container.addNotify()

public void addNotify()
Makes this Container displayable by connecting it to a native screen resource. Making a container displayable will cause all of its children to be made displayable. This method is called internally by the toolkit and should not be called directly by programs.

Overrides:
addNotify sample code for java.awt.Component.addNotify() definition code for java.awt.Component.addNotify() in class Component sample code for java.awt.Component definition code for java.awt.Component
See Also:
Component.isDisplayable() sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable() , removeNotify() sample code for java.awt.Container.removeNotify() definition code for java.awt.Container.removeNotify()

removeNotify sample code for java.awt.Container.removeNotify() definition code for java.awt.Container.removeNotify()

public void removeNotify()
Makes this Container undisplayable by removing its connection to its native screen resource. Making a container undisplayable will cause all of its children to be made undisplayable. This method is called by the toolkit internally and should not be called directly by programs.

Overrides:
removeNotify sample code for java.awt.Component.removeNotify() definition code for java.awt.Component.removeNotify() in class Component sample code for java.awt.Component definition code for java.awt.Component
See Also:
Component.isDisplayable() sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable() , addNotify() sample code for java.awt.Container.addNotify() definition code for java.awt.Container.addNotify()

isAncestorOf sample code for java.awt.Container.isAncestorOf(java.awt.Component) definition code for java.awt.Container.isAncestorOf(java.awt.Component)

public boolean isAncestorOf(Component sample code for java.awt.Component definition code for java.awt.Component  c)
Checks if the component is contained in the component hierarchy of this container.

Parameters:
c - the component
Returns:
true if it is an ancestor; false otherwise.
Since:
JDK1.1

paramString sample code for java.awt.Container.paramString() definition code for java.awt.Container.paramString()

protected String sample code for java.lang.String definition code for java.lang.String  paramString()
Returns a string representing the state of this Container. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overrides:
paramString sample code for java.awt.Component.paramString() definition code for java.awt.Component.paramString() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
the parameter string of this container

list sample code for java.awt.Container.list(java.io.PrintStream, int) definition code for java.awt.Container.list(java.io.PrintStream, int)

public void list(PrintStream sample code for java.io.PrintStream definition code for java.io.PrintStream  out,
                 int indent)
Prints a listing of this container to the specified output stream. The listing starts at the specified indentation.

The immediate children of the container are printed with an indentation of indent+1. The children of those children are printed at indent+2 and so on.

Overrides:
list sample code for java.awt.Component.list(java.io.PrintStream, int) definition code for java.awt.Component.list(java.io.PrintStream, int) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
out - a print stream
indent - the number of spaces to indent
Since:
JDK1.0
See Also:
Component.list(java.io.PrintStream, int) sample code for java.awt.Component.list(java.io.PrintStream, int) definition code for java.awt.Component.list(java.io.PrintStream, int)

list sample code for java.awt.Container.list(java.io.PrintWriter, int) definition code for java.awt.Container.list(java.io.PrintWriter, int)

public void list(PrintWriter sample code for java.io.PrintWriter definition code for java.io.PrintWriter  out,
                 int indent)
Prints out a list, starting at the specified indentation, to the specified print writer.

The immediate children of the container are printed with an indentation of indent+1. The children of those children are printed at indent+2 and so on.

Overrides:
list sample code for java.awt.Component.list(java.io.PrintWriter, int) definition code for java.awt.Component.list(java.io.PrintWriter, int) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
out - a print writer
indent - the number of spaces to indent
Since:
JDK1.1
See Also:
Component.list(java.io.PrintWriter, int) sample code for java.awt.Component.list(java.io.PrintWriter, int) definition code for java.awt.Component.list(java.io.PrintWriter, int)

setFocusTraversalKeys sample code for java.awt.Container.setFocusTraversalKeys(int, java.util.Set<? extends java.awt.AWTKeyStroke>) definition code for java.awt.Container.setFocusTraversalKeys(int, java.util.Set<? extends java.awt.AWTKeyStroke>)

public void setFocusTraversalKeys(int id,
                                  Set sample code for java.util.Set definition code for java.util.Set <? extends AWTKeyStroke sample code for java.awt.AWTKeyStroke definition code for java.awt.AWTKeyStroke > keystrokes)
Sets the focus traversal keys for a given traversal operation for this Container.

The default values for a Container's focus traversal keys are implementation-dependent. Sun recommends that all implementations for a particular native platform use the same default values. The recommendations for Windows and Unix are listed below. These recommendations are used in the Sun AWT implementations.

Identifier Meaning Default
KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS Normal forward keyboard traversal TAB on KEY_PRESSED, CTRL-TAB on KEY_PRESSED
KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS Normal reverse keyboard traversal SHIFT-TAB on KEY_PRESSED, CTRL-SHIFT-TAB on KEY_PRESSED
KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS Go up one focus traversal cycle none
KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS Go down one focus traversal cycle none
To disable a traversal key, use an empty Set; Collections.EMPTY_SET is recommended.

Using the AWTKeyStroke API, client code can specify on which of two specific KeyEvents, KEY_PRESSED or KEY_RELEASED, the focus traversal operation will occur. Regardless of which KeyEvent is specified, however, all KeyEvents related to the focus traversal key, including the associated KEY_TYPED event, will be consumed, and will not be dispatched to any Container. It is a runtime error to specify a KEY_TYPED event as mapping to a focus traversal operation, or to map the same event to multiple default focus traversal operations.

If a value of null is specified for the Set, this Container inherits the Set from its parent. If all ancestors of this Container have null specified for the Set, then the current KeyboardFocusManager's default Set is used.

Overrides:
setFocusTraversalKeys sample code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
id - one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
keystrokes - the Set of AWTKeyStroke for the specified operation
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if id is not one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS, or if keystrokes contains null, or if any Object in keystrokes is not an AWTKeyStroke, or if any keystroke represents a KEY_TYPED event, or if any keystroke already maps to another focus traversal operation for this Container
Since:
1.4
See Also:
getFocusTraversalKeys(int) sample code for java.awt.Container.getFocusTraversalKeys(int) definition code for java.awt.Container.getFocusTraversalKeys(int) , KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS , KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS , KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS , KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS

getFocusTraversalKeys sample code for java.awt.Container.getFocusTraversalKeys(int) definition code for java.awt.Container.getFocusTraversalKeys(int)

public Set sample code for java.util.Set definition code for java.util.Set <AWTKeyStroke sample code for java.awt.AWTKeyStroke definition code for java.awt.AWTKeyStroke > getFocusTraversalKeys(int id)
Returns the Set of focus traversal keys for a given traversal operation for this Container. (See setFocusTraversalKeys for a full description of each key.)

If a Set of traversal keys has not been explicitly defined for this Container, then this Container's parent's Set is returned. If no Set has been explicitly defined for any of this Container's ancestors, then the current KeyboardFocusManager's default Set is returned.

Overrides:
getFocusTraversalKeys sample code for java.awt.Component.getFocusTraversalKeys(int) definition code for java.awt.Component.getFocusTraversalKeys(int) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
id - one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
Returns:
the Set of AWTKeyStrokes for the specified operation. The Set will be unmodifiable, and may be empty. null will never be returned.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if id is not one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
Since:
1.4
See Also:
setFocusTraversalKeys(int, java.util.Set) sample code for java.awt.Container.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Container.setFocusTraversalKeys(int, java.util.Set) , KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS , KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS , KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS , KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS

areFocusTraversalKeysSet sample code for java.awt.Container.areFocusTraversalKeysSet(int) definition code for java.awt.Container.areFocusTraversalKeysSet(int)

public boolean areFocusTraversalKeysSet(int id)
Returns whether the Set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Container. If this method returns false, this Container is inheriting the Set from an ancestor, or from the current KeyboardFocusManager.

Overrides:
areFocusTraversalKeysSet sample code for java.awt.Component.areFocusTraversalKeysSet(int) definition code for java.awt.Component.areFocusTraversalKeysSet(int) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
id - one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
Returns:
true if the the Set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Component; false otherwise.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if id is not one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
Since:
1.4

isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot(java.awt.Container) definition code for java.awt.Container.isFocusCycleRoot(java.awt.Container)

public boolean isFocusCycleRoot(Container sample code for java.awt.Container definition code for java.awt.Container  container)
Returns whether the specified Container is the focus cycle root of this Container's focus traversal cycle. Each focus traversal cycle has only a single focus cycle root and each Container which is not a focus cycle root belongs to only a single focus traversal cycle. Containers which are focus cycle roots belong to two cycles: one rooted at the Container itself, and one rooted at the Container's nearest focus-cycle-root ancestor. This method will return true for both such Containers in this case.

Overrides:
isFocusCycleRoot sample code for java.awt.Component.isFocusCycleRoot(java.awt.Container) definition code for java.awt.Component.isFocusCycleRoot(java.awt.Container) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
container - the Container to be tested
Returns:
true if the specified Container is a focus-cycle- root of this Container; false otherwise
Since:
1.4
See Also:
isFocusCycleRoot() sample code for java.awt.Container.isFocusCycleRoot() definition code for java.awt.Container.isFocusCycleRoot()

transferFocusBackward sample code for java.awt.Container.transferFocusBackward() definition code for java.awt.Container.transferFocusBackward()

public void transferFocusBackward()
Description copied from class: Component sample code for java.awt.Component.transferFocusBackward() definition code for java.awt.Component.transferFocusBackward()
Transfers the focus to the previous component, as though this Component were the focus owner.

Overrides:
transferFocusBackward sample code for java.awt.Component.transferFocusBackward() definition code for java.awt.Component.transferFocusBackward() in class Component sample code for java.awt.Component definition code for java.awt.Component
See Also:
Component.requestFocus() sample code for java.awt.Component.requestFocus() definition code for java.awt.Component.requestFocus()

setFocusTraversalPolicy sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy)

public void setFocusTraversalPolicy(FocusTraversalPolicy sample code for java.awt.FocusTraversalPolicy definition code for java.awt.FocusTraversalPolicy  policy)
Sets the focus traversal policy that will manage keyboard traversal of this Container's children, if this Container is a focus cycle root. If the argument is null, this Container inherits its policy from its focus- cycle-root ancestor. If the argument is non-null, this policy will be inherited by all focus-cycle-root children that have no keyboard- traversal policy of their own (as will, recursively, their focus-cycle- root children).

If this Container is not a focus cycle root, the policy will be remembered, but will not be used or inherited by this or any other Containers until this Container is made a focus cycle root.

Parameters:
policy - the new focus traversal policy for this Container
Since:
1.4
See Also:
getFocusTraversalPolicy() sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy() , setFocusCycleRoot(boolean) sample code for java.awt.Container.setFocusCycleRoot(boolean) definition code for java.awt.Container.setFocusCycleRoot(boolean) , isFocusCycleRoot(java.awt.Container) sample code for java.awt.Container.isFocusCycleRoot(java.awt.Container) definition code for java.awt.Container.isFocusCycleRoot(java.awt.Container)

getFocusTraversalPolicy sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy()

public FocusTraversalPolicy sample code for java.awt.FocusTraversalPolicy definition code for java.awt.FocusTraversalPolicy  getFocusTraversalPolicy()
Returns the focus traversal policy that will manage keyboard traversal of this Container's children, or null if this Container is not a focus cycle root. If no traversal policy has been explicitly set for this Container, then this Container's focus-cycle-root ancestor's policy is returned.

Returns:
this Container's focus traversal policy, or null if this Container is not a focus cycle root.
Since:
1.4
See Also:
setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , setFocusCycleRoot(boolean) sample code for java.awt.Container.setFocusCycleRoot(boolean) definition code for java.awt.Container.setFocusCycleRoot(boolean) , isFocusCycleRoot(java.awt.Container) sample code for java.awt.Container.isFocusCycleRoot(java.awt.Container) definition code for java.awt.Container.isFocusCycleRoot(java.awt.Container)

isFocusTraversalPolicySet sample code for java.awt.Container.isFocusTraversalPolicySet() definition code for java.awt.Container.isFocusTraversalPolicySet()

public boolean isFocusTraversalPolicySet()
Returns whether the focus traversal policy has been explicitly set for this Container. If this method returns false, this Container will inherit its focus traversal policy from an ancestor.

Returns:
true if the focus traversal policy has been explicitly set for this Container; false otherwise.
Since:
1.4

setFocusCycleRoot sample code for java.awt.Container.setFocusCycleRoot(boolean) definition code for java.awt.Container.setFocusCycleRoot(boolean)

public void setFocusCycleRoot(boolean focusCycleRoot)
Sets whether this Container is the root of a focus traversal cycle. Once focus enters a traversal cycle, typically it cannot leave it via focus traversal unless one of the up- or down-cycle keys is pressed. Normal traversal is limited to this Container, and all of this Container's descendants that are not descendants of inferior focus cycle roots. Note that a FocusTraversalPolicy may bend these restrictions, however. For example, ContainerOrderFocusTraversalPolicy supports implicit down-cycle traversal.

The alternative way to specify the traversal order of this Container's children is to make this Container a focus traversal policy provider.

Parameters:
focusCycleRoot - indicates whether this Container is the root of a focus traversal cycle
Since:
1.4
See Also:
isFocusCycleRoot() sample code for java.awt.Container.isFocusCycleRoot() definition code for java.awt.Container.isFocusCycleRoot() , setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , getFocusTraversalPolicy() sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy() , ContainerOrderFocusTraversalPolicy sample code for java.awt.ContainerOrderFocusTraversalPolicy definition code for java.awt.ContainerOrderFocusTraversalPolicy , setFocusTraversalPolicyProvider(boolean) sample code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) definition code for java.awt.Container.setFocusTraversalPolicyProvider(boolean)

isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot() definition code for java.awt.Container.isFocusCycleRoot()

public boolean isFocusCycleRoot()
Returns whether this Container is the root of a focus traversal cycle. Once focus enters a traversal cycle, typically it cannot leave it via focus traversal unless one of the up- or down-cycle keys is pressed. Normal traversal is limited to this Container, and all of this Container's descendants that are not descendants of inferior focus cycle roots. Note that a FocusTraversalPolicy may bend these restrictions, however. For example, ContainerOrderFocusTraversalPolicy supports implicit down-cycle traversal.

Returns:
whether this Container is the root of a focus traversal cycle
Since:
1.4
See Also:
setFocusCycleRoot(boolean) sample code for java.awt.Container.setFocusCycleRoot(boolean) definition code for java.awt.Container.setFocusCycleRoot(boolean) , setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , getFocusTraversalPolicy() sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy() , ContainerOrderFocusTraversalPolicy sample code for java.awt.ContainerOrderFocusTraversalPolicy definition code for java.awt.ContainerOrderFocusTraversalPolicy

setFocusTraversalPolicyProvider sample code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) definition code for java.awt.Container.setFocusTraversalPolicyProvider(boolean)

public final void setFocusTraversalPolicyProvider(boolean provider)
Sets whether this container will be used to provide focus traversal policy. Container with this property as true will be used to acquire focus traversal policy instead of closest focus cycle root ancestor.

Parameters:
provide - indicates whether this container will be used to provide focus traversal policy
Since:
1.5
See Also:
setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , getFocusTraversalPolicy() sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy() , isFocusTraversalPolicyProvider() sample code for java.awt.Container.isFocusTraversalPolicyProvider() definition code for java.awt.Container.isFocusTraversalPolicyProvider()

isFocusTraversalPolicyProvider sample code for java.awt.Container.isFocusTraversalPolicyProvider() definition code for java.awt.Container.isFocusTraversalPolicyProvider()

public final boolean isFocusTraversalPolicyProvider()
Returns whether this container provides focus traversal policy. If this property is set to true then when keyboard focus manager searches container hierarchy for focus traversal policy and encounters this container before any other container with this property as true or focus cycle roots then its focus traversal policy will be used instead of focus cycle root's policy.

Returns:
true if this container provides focus traversal policy, false otherwise
Since:
1.5
See Also:
setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , getFocusTraversalPolicy() sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy() , setFocusCycleRoot(boolean) sample code for java.awt.Container.setFocusCycleRoot(boolean) definition code for java.awt.Container.setFocusCycleRoot(boolean) , setFocusTraversalPolicyProvider(boolean) sample code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) definition code for java.awt.Container.setFocusTraversalPolicyProvider(boolean)

transferFocusDownCycle sample code for java.awt.Container.transferFocusDownCycle() definition code for java.awt.Container.transferFocusDownCycle()

public void transferFocusDownCycle()
Transfers the focus down one focus traversal cycle. If this Container is a focus cycle root, then the focus owner is set to this Container's default Component to focus, and the current focus cycle root is set to this Container. If this Container is not a focus cycle root, then no focus traversal operation occurs.

Since:
1.4
See Also:
Component.requestFocus() sample code for java.awt.Component.requestFocus() definition code for java.awt.Component.requestFocus() , isFocusCycleRoot(java.awt.Container) sample code for java.awt.Container.isFocusCycleRoot(java.awt.Container) definition code for java.awt.Container.isFocusCycleRoot(java.awt.Container) , setFocusCycleRoot(boolean) sample code for java.awt.Container.setFocusCycleRoot(boolean) definition code for java.awt.Container.setFocusCycleRoot(boolean)

applyComponentOrientation sample code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation)

public void applyComponentOrientation(ComponentOrientation sample code for java.awt.ComponentOrientation definition code for java.awt.ComponentOrientation  o)
Sets the ComponentOrientation property of this container and all components contained within it.

Overrides:
applyComponentOrientation sample code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
o - the new component orientation of this container and the components contained within it.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if orientation is null.
Since:
1.4
See Also:
Component.setComponentOrientation(java.awt.ComponentOrientation) sample code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) , Component.getComponentOrientation() sample code for java.awt.Component.getComponentOrientation() definition code for java.awt.Component.getComponentOrientation()

addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener)

public void addPropertyChangeListener(PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all bound properties of this class, including the following: Note that if this Container is inheriting a bound property, then no event will be fired in response to a change in the inherited property.

If listener is null, no exception is thrown and no action is performed.

Overrides:
addPropertyChangeListener sample code for java.awt.Component.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.addPropertyChangeListener(java.beans.PropertyChangeListener) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
listener - the PropertyChangeListener to be added
See Also:
Component.removePropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) , addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener) sample code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

public void addPropertyChangeListener(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                      PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
Adds a PropertyChangeListener to the listener list for a specific property. The specified property may be user-defined, or one of the following defaults: Note that if this Container is inheriting a bound property, then no event will be fired in response to a change in the inherited property.

If listener is null, no exception is thrown and no action is performed.

Overrides:
addPropertyChangeListener sample code for java.awt.Component.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Component.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
propertyName - one of the property names listed above
listener - the PropertyChangeListener to be added
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) , Component.removePropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener)