JSR-62 (Final)

Uses of Class
java.awt.Component

Packages that use Component
java.applet Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context. 
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images. 
java.awt.event Provides interfaces and classes for dealing with different types of events fired by AWT components. 
 

Uses of Component in java.applet
 

Subclasses of Component in java.applet
 class Applet
          An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.
 

Uses of Component in java.awt
 

Subclasses of Component in java.awt
 class Button
          This class creates a labeled button.
 class Canvas
          A Canvas component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.
 class Checkbox
          A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
 class Choice
          The Choice class presents a pop-up menu of choices.
 class Container
          A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
 class Dialog
          A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.
 class FileDialog
          The FileDialog class displays a dialog window from which the user can select a file.
 class Frame
          A Frame is a top-level window with a title and a border.
 class Label
          A Label object is a component for placing text in a container.
 class List
          The List component presents the user with a scrolling list of text items.
 class Panel
          Panel is the simplest container class.
 class Scrollbar
          The Scrollbar class embodies a scroll bar, a familiar user-interface object.
 class ScrollPane
          A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
 class TextArea
          A TextArea object is a multi-line region that displays text.
 class TextComponent
          The TextComponent class is the superclass of any component that allows the editing of some text.
 class TextField
          A TextField object is a text component that allows for the editing of a single line of text.
 class Window
          A Window object is a top-level window with no borders and no menubar.
 

Methods in java.awt that return Component
 Component Window.getFocusOwner()
          Returns the child component of this Window which has focus if and only if this Window is active.
 Component Container.getComponent(int n)
          Gets the nth component in this container.
 Component[] Container.getComponents()
          Gets all the components in this container.
 Component Container.add(Component comp)
          Adds the specified component to the end of this container.
 Component Container.add(String name, Component comp)
          Adds the specified component to this container.
 Component Container.add(Component comp, int index)
          Adds the specified component to this container at the given position.
 Component Container.getComponentAt(int x, int y)
          Locates the component that contains the x,y position.
 Component Container.findComponentAt(int x, int y)
          Locates the visible child component that contains the specified position.
 Component Container.findComponentAt(Point p)
          Locates the visible child component that contains the specified point.
 Component Container.locate(int x, int y)
          Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
 Component Container.getComponentAt(Point p)
          Gets the component that contains the specified point.
 Component Component.getComponentAt(int x, int y)
          Determines if this component or one of its immediate subcomponents contains the (xy) location, and if so, returns the containing component.
 Component Component.locate(int x, int y)
          Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
 Component Component.getComponentAt(Point p)
          Returns the component or subcomponent that contains the specified point.
 

Methods in java.awt with parameters of type Component
 void PopupMenu.show(Component origin, int x, int y)
          Shows the popup menu at the x, y position relative to an origin component.
protected  void ScrollPane.addImpl(Component comp, Object constraints, int index)
          Adds the specified component to this scroll pane container.
 void LayoutManager2.addLayoutComponent(Component comp, Object constraints)
          Adds the specified component to the layout, using the specified constraint object.
 void LayoutManager.addLayoutComponent(String name, Component comp)
          Adds the specified component with the specified name to the layout.
 void LayoutManager.removeLayoutComponent(Component comp)
          Removes the specified component from the layout.
 void GridLayout.addLayoutComponent(String name, Component comp)
          Adds the specified component with the specified name to the layout.
 void GridLayout.removeLayoutComponent(Component comp)
          Removes the specified component from the layout.
 void GridBagLayout.setConstraints(Component comp, GridBagConstraints constraints)
          Sets the constraints for the specified component in this layout.
 GridBagConstraints GridBagLayout.getConstraints(Component comp)
          Gets the constraints for the specified component.
protected  GridBagConstraints GridBagLayout.lookupConstraints(Component comp)
          Retrieves the constraints for the specified component.
 void GridBagLayout.addLayoutComponent(String name, Component comp)
          Adds the specified component with the specified name to the layout.
 void GridBagLayout.addLayoutComponent(Component comp, Object constraints)
          Adds the specified component to the layout, using the specified constraint object.
 void GridBagLayout.removeLayoutComponent(Component comp)
          Removes the specified component from this layout.
 void FlowLayout.addLayoutComponent(String name, Component comp)
          Adds the specified component to the layout.
 void FlowLayout.removeLayoutComponent(Component comp)
          Removes the specified component from the layout.
 Component Container.add(Component comp)
          Adds the specified component to the end of this container.
 Component Container.add(String name, Component comp)
          Adds the specified component to this container.
 Component Container.add(Component comp, int index)
          Adds the specified component to this container at the given position.
 void Container.add(Component comp, Object constraints)
          Adds the specified component to the end of this container.
 void Container.add(Component comp, Object constraints, int index)
          Adds the specified component to this container with the specified constraints at the specified index.
protected  void Container.addImpl(Component comp, Object constraints, int index)
          Adds the specified component to this container at the specified index.
 void Container.remove(Component comp)
          Removes the specified component from this container.
 boolean Container.isAncestorOf(Component c)
          Checks if the component is contained in the component hierarchy of this container.
 void CardLayout.addLayoutComponent(Component comp, Object constraints)
          Adds the specified component to this card layout's internal table of names.
 void CardLayout.addLayoutComponent(String name, Component comp)
          Deprecated. replaced by addLayoutComponent(Component, Object).
 void CardLayout.removeLayoutComponent(Component comp)
          Removes the specified component from the layout.
 void BorderLayout.addLayoutComponent(Component comp, Object constraints)
          Adds the specified component to the layout, using the specified constraint object.
 void BorderLayout.addLayoutComponent(String name, Component comp)
          Deprecated. replaced by addLayoutComponent(Component, Object).
 void BorderLayout.removeLayoutComponent(Component comp)
          Removes the specified component from this border layout.
 

Constructors in java.awt with parameters of type Component
MediaTracker(Component comp)
          Creates a media tracker to track images for a given component.
 

Uses of Component in java.awt.event
 

Methods in java.awt.event that return Component
 Component ComponentEvent.getComponent()
          Returns the originator of the event.
 Component ContainerEvent.getChild()
          Returns the component that was affected by the event.
 

Constructors in java.awt.event with parameters of type Component
PaintEvent(Component source, int id, Rectangle updateRect)
          Constructs a PaintEvent object with the specified source component and type.
KeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar)
          Constructs a KeyEvent object.
KeyEvent(Component source, int id, long when, int modifiers, int keyCode)
           
MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger)
          Constructs a MouseEvent object with the specified source component, type, modifiers, coordinates, and click count.
FocusEvent(Component source, int id, boolean temporary)
          Constructs a FocusEvent object and identifies whether or not the change is temporary.
FocusEvent(Component source, int id)
          Constructs a FocusEvent object and identifies it as a permanent change in focus.
ComponentEvent(Component source, int id)
          Constructs a ComponentEvent object.
ContainerEvent(Component source, int id, Component child)
          Constructs a ContainerEvent object.
ContainerEvent(Component source, int id, Component child)
          Constructs a ContainerEvent object.
 


JSR-62 (Final)

Java and Java 2D are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Copyright 1993 - 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, U.S.A. All Rights Reserved.
Use of this specification is subject to this license.