java.awt
Class Component

java.lang.Object
  |
  +--java.awt.Component
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
Box.Filler, Button, Canvas, Checkbox, Choice, Container, Label, List, Scrollbar, TextComponent

public abstract class Component
extends Object
implements ImageObserver, MenuContainer, Serializable

A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user. Examples of components are the buttons, checkboxes, and scrollbars of a typical graphical user interface.

The Component class is the abstract superclass of the nonmenu-related Abstract Window Toolkit components. Class Component can also be extended directly to create a lightweight component. A lightweight component is a component that is not associated with a native opaque window.

See Also:
Serialized Form

Inner Class Summary
protected  class Component.AccessibleAWTComponent
Component.AccessibleAWTComponent
Inner class of Component used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by component developers.

The class used to obtain the accessible role for this object.

 
Field Summary
static float BOTTOM_ALIGNMENT
copy->  BOTTOM_ALIGNMENT
Ease-of-use constant for getAlignmentY. Specifies an alignment to the bottom of the component.
See Also:
getAlignmentY()
static float CENTER_ALIGNMENT
copy->  CENTER_ALIGNMENT
Ease-of-use constant for getAlignmentY and getAlignmentX. Specifies an alignment to the center of the component
See Also:
getAlignmentX(), getAlignmentY()
static float LEFT_ALIGNMENT
copy->  LEFT_ALIGNMENT
Ease-of-use constant for getAlignmentX. Specifies an alignment to the left side of the component.
See Also:
getAlignmentX()
static float RIGHT_ALIGNMENT
copy->  RIGHT_ALIGNMENT
Ease-of-use constant for getAlignmentX. Specifies an alignment to the right side of the component.
See Also:
getAlignmentX()
static float TOP_ALIGNMENT
copy->  TOP_ALIGNMENT
Ease-of-use constant for getAlignmentY(). Specifies an alignment to the top of the component.
See Also:
getAlignmentY()
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
protected Component
copy->  new Component()
copy->  <Component var> = new Component();
Constructs a new component. Class Component can be extended directly to create a lightweight component that does not utilize an opaque native window. A lightweight component must be hosted by a native container somewhere higher up in the component tree (for example, by a Frame object).
 
Method Summary
 boolean action(Event evt, Object what)
copy->  .action(, )
copy->  <boolean var>=<Component>.action(<Event evt>, <Object what>);
Deprecated. As of JDK version 1.1, should register this component as ActionListener on component which fires action events.

 void add(PopupMenu popup)
copy->  .add( )
copy->  <Component>.add(<PopupMenu popup>);
Adds the specified popup menu to the component.
Parameters:
popup - the popup menu to be added to the component.
Since:
JDK1.1
See Also:
remove(java.awt.MenuComponent)
 void addComponentListener(ComponentListener l)
copy->  .addComponentListener( )
copy->  <Component>.addComponentListener(<ComponentListener l>);
Adds the specified component listener to receive component events from this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the component listener.
Since:
JDK1.1
See Also:
ComponentEvent, ComponentListener, removeComponentListener(java.awt.event.ComponentListener)
 void addFocusListener(FocusListener l)
copy->  .addFocusListener( )
copy->  <Component>.addFocusListener(<FocusListener l>);
Adds the specified focus listener to receive focus events from this component when this component gains input focus. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the focus listener.
Since:
JDK1.1
See Also:
FocusEvent, FocusListener, removeFocusListener(java.awt.event.FocusListener)
 void addHierarchyBoundsListener(HierarchyBoundsListener l)
copy->  .addHierarchyBoundsListener( )
copy->  <Component>.addHierarchyBoundsListener(<HierarchyBoundsListener l>);
Adds the specified hierarchy bounds listener to receive hierarchy bounds events from this component when the hierarchy to which this container belongs changes. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the hierarchy bounds listener.
Since:
1.3
See Also:
HierarchyEvent, HierarchyBoundsListener, removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener)
 void addHierarchyListener(HierarchyListener l)
copy->  .addHierarchyListener( )
copy->  <Component>.addHierarchyListener(<HierarchyListener l>);
Adds the specified hierarchy listener to receive hierarchy changed events from this component when the hierarchy to which this container belongs changes. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the hierarchy listener.
Since:
1.3
See Also:
HierarchyEvent, HierarchyListener, removeHierarchyListener(java.awt.event.HierarchyListener)
 void addInputMethodListener(InputMethodListener l)
copy->  .addInputMethodListener( )
copy->  <Component>.addInputMethodListener(<InputMethodListener l>);
Adds the specified input method listener to receive input method events from this component. A component will only receive input method events from input methods if it also overrides getInputMethodRequests to return an InputMethodRequests instance. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the input method listener.
Since:
1.2
See Also:
InputMethodEvent, InputMethodListener, removeInputMethodListener(java.awt.event.InputMethodListener), getInputMethodRequests()
 void addKeyListener(KeyListener l)
copy->  .addKeyListener( )
copy->  <Component>.addKeyListener(<KeyListener l>);
Adds the specified key listener to receive key events from this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the key listener.
Since:
JDK1.1
See Also:
KeyEvent, KeyListener, removeKeyListener(java.awt.event.KeyListener)
 void addMouseListener(MouseListener l)
copy->  .addMouseListener( )
copy->  <Component>.addMouseListener(<MouseListener l>);
Adds the specified mouse listener to receive mouse events from this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the mouse listener.
Since:
JDK1.1
See Also:
MouseEvent, MouseListener, removeMouseListener(java.awt.event.MouseListener)
 void addMouseMotionListener(MouseMotionListener l)
copy->  .addMouseMotionListener( )
copy->  <Component>.addMouseMotionListener(<MouseMotionListener l>);
Adds the specified mouse motion listener to receive mouse motion events from this component. If l is null, no exception is thrown and no action is performed.
Parameters:
l - the mouse motion listener.
Since:
JDK1.1
See Also:
java.awt.event.MouseMotionEvent, MouseMotionListener, removeMouseMotionListener(java.awt.event.MouseMotionListener)
 void addNotify()
copy->  .addNotify()
copy->  <Component>.addNotify();
Makes this Component displayable by connecting it to a native screen resource. This method is called internally by the toolkit and should not be called directly by programs.
Since:
JDK1.0
See Also:
isDisplayable(), removeNotify()
 void addPropertyChangeListener(PropertyChangeListener listener)
copy->  .addPropertyChangeListener( )
copy->  <Component>.addPropertyChangeListener(<PropertyChangeListener listener>);
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to an explicit setFont, setBackground, or SetForeground on the current component. Note that if the current component is inheriting its foreground, background, or font from its container, 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.

Parameters:
listener - The PropertyChangeListener to be added
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
copy->  .addPropertyChangeListener(, )
copy->  <Component>.addPropertyChangeListener(<String propertyName>, <PropertyChangeListener listener>);
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property. If listener is null, no exception is thrown and no action is performed.
Parameters:
propertyName - The name of the property to listen on.
listener - The PropertyChangeListener to be added
 Rectangle bounds()
copy->  .bounds()
copy->  <Rectangle var>=<Component>.bounds();
Deprecated. As of JDK version 1.1, replaced by getBounds().

 int checkImage(Image image, ImageObserver observer)
copy->  .checkImage(, )
copy->  <int var>=<Component>.checkImage(<Image image>, <ImageObserver observer>);
Returns the status of the construction of a screen representation of the specified image.

This method does not cause the image to begin loading. An application must use the prepareImage method to force the loading of an image.

Information on the flags returned by this method can be found with the discussion of the ImageObserver interface.

Parameters:
image - the Image object whose status is being checked.
observer - the ImageObserver object to be notified as the image is being prepared.
Returns:
the bitwise inclusive OR of ImageObserver flags indicating what information about the image is currently available.
Since:
JDK1.0
See Also:
prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver), Toolkit.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver), ImageObserver
 int checkImage(Image image, int width, int height, ImageObserver observer)
copy->  .checkImage(, , , )
copy->  <int var>=<Component>.checkImage(<Image image>, <int width>, <int height>, <ImageObserver observer>);
Returns the status of the construction of a screen representation of the specified image.

This method does not cause the image to begin loading. An application must use the prepareImage method to force the loading of an image.

The checkImage method of Component calls its peer's checkImage method to calculate the flags. If this component does not yet have a peer, the component's toolkit's checkImage method is called instead.

Information on the flags returned by this method can be found with the discussion of the ImageObserver interface.

Parameters:
image - the Image object whose status is being checked.
width - the width of the scaled version whose status is to be checked.
height - the height of the scaled version whose status is to be checked.
observer - the ImageObserver object to be notified as the image is being prepared.
Returns:
the bitwise inclusive OR of ImageObserver flags indicating what information about the image is currently available.
Since:
JDK1.0
See Also:
prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver), Toolkit.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver), ImageObserver
protected  AWTEvent coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent)
copy->  .coalesceEvents(, )
copy->  <AWTEvent var>=<Component>.coalesceEvents(<AWTEvent existingEvent>, <AWTEvent newEvent>);
Potentially coalesce an event being posted with an existing event. This method is called by EventQueue.postEvent if an event with the same ID as the event to be posted is found in the queue (both events must have this component as their source). This method either returns a coalesced event which replaces the existing event (and the new event is then discarded), or null to indicate that no combining should be done (add the second event to the end of the queue). Either event parameter may be modified and returned, as the other one is discarded unless null is returned.

This implementation of coalesceEvents coalesces two event types: mouse move (and drag) events, and paint (and update) events. For mouse move events the last event is always returned, causing intermediate moves to be discarded. For paint events, the new event is coalesced into a complex RepaintArea in the peer. The new Event is always returned.

Parameters:
existingEvent - the event already on the EventQueue.
newEvent - the event being posted to the EventQueue.
Returns:
a coalesced event, or null indicating that no coalescing was done.
 boolean contains(int x, int y)
copy->  .contains(, )
copy->  <boolean var>=<Component>.contains(<int x>, <int y>);
Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
Parameters:
x - the x coordinate of the point.
y - the y coordinate of the point.
Since:
JDK1.1
See Also:
getComponentAt(int, int)
 boolean contains(Point p)
copy->  .contains( )
copy->  <boolean var>=<Component>.contains(<Point p>);
Checks whether this component "contains" the specified point, where the point's x and y coordinates are defined to be relative to the coordinate system of this component.
Parameters:
p - the point.
Since:
JDK1.1
See Also:
getComponentAt(java.awt.Point)
 Image createImage(ImageProducer producer)
copy->  .createImage( )
copy->  <Image var>=<Component>.createImage(<ImageProducer producer>);
Creates an image from the specified image producer.
Parameters:
producer - the image producer
Returns:
the image produced.
Since:
JDK1.0
 Image createImage(int width, int height)
copy->  .createImage(, )
copy->  <Image var>=<Component>.createImage(<int width>, <int height>);
Creates an off-screen drawable image to be used for double buffering.
Parameters:
width - the specified width.
height - the specified height.
Returns:
an off-screen drawable image, which can be used for double buffering.
Since:
JDK1.0
 void deliverEvent(Event e)
copy->  .deliverEvent( )
copy->  <Component>.deliverEvent(<Event e>);
Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e).

 void disable()
copy->  .disable()
copy->  <Component>.disable();
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

protected  void disableEvents(long eventsToDisable)
copy->  .disableEvents( )
copy->  <Component>.disableEvents(<long eventsToDisable>);
Disables the events defined by the specified event mask parameter from being delivered to this component.
Parameters:
eventsToDisable - the event mask defining the event types
Since:
JDK1.1
See Also:
enableEvents(long)
 void dispatchEvent(AWTEvent e)
copy->  .dispatchEvent( )
copy->  <Component>.dispatchEvent(<AWTEvent e>);
Dispatches an event to this component or one of its sub components. Calls processEvent() before returning for 1.1-style events which have been enabled for the Component.
Parameters:
e - the event
 void doLayout()
copy->  .doLayout()
copy->  <Component>.doLayout();
Prompts the layout manager to lay out this component. This is usually called when the component (more specifically, container) is validated.
See Also:
validate(), LayoutManager
 void enable()
copy->  .enable()
copy->  <Component>.enable();
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

 void enable(boolean b)
copy->  .enable( )
copy->  <Component>.enable(<boolean b>);
Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

protected  void enableEvents(long eventsToEnable)
copy->  .enableEvents( )
copy->  <Component>.enableEvents(<long eventsToEnable>);
Enables the events defined by the specified event mask parameter to be delivered to this component.

Event types are automatically enabled when a listener for that event type is added to the component.

This method only needs to be invoked by subclasses of Component which desire to have the specified event types delivered to processEvent regardless of whether or not a listener is registered.

Parameters:
eventsToEnable - the event mask defining the event types.
Since:
JDK1.1
See Also:
processEvent(java.awt.AWTEvent), disableEvents(long)
 void enableInputMethods(boolean enable)
copy->  .enableInputMethods( )
copy->  <Component>.enableInputMethods(<boolean enable>);
Enables or disables input method support for this component. If input method support is enabled and the component also processes key events, incoming events are offered to the current input method and will only be processed by the component or dispatched to its listeners if the input method does not consume them. By default, input method support is enabled.
Parameters:
enable - true to enable, false to disable.
Since:
1.2
See Also:
processKeyEvent(java.awt.event.KeyEvent)
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
copy->  .firePropertyChange(, , )
copy->  <Component>.firePropertyChange(<String propertyName>, <Object oldValue>, <Object newValue>);
Support for reporting bound property changes. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.
 AccessibleContext getAccessibleContext()
copy->  .getAccessibleContext()
copy->  <AccessibleContext var>=<Component>.getAccessibleContext();
Get the AccessibleContext associated with this Component
Returns:
the AccessibleContext of this Component
 float getAlignmentX()
copy->  .getAlignmentX()
copy->  <float var>=<Component>.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.
 float getAlignmentY()
copy->  .getAlignmentY()
copy->  <float var>=<Component>.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.
 Color getBackground()
copy->  .getBackground()
copy->  <Color var>=<Component>.getBackground();
Gets the background color of this component.
Returns:
This component's background color. If this component does not have a background color, the background color of its parent is returned.
Since:
JDK1.0
See Also:
setBackground(java.awt.Color)
 Rectangle getBounds()
copy->  .getBounds()
copy->  <Rectangle var>=<Component>.getBounds();
Gets the bounds of this component in the form of a Rectangle object. The bounds specify this component's width, height, and location relative to its parent.
Returns:
A rectangle indicating this component's bounds.
See Also:
setBounds(int, int, int, int), getLocation(), getSize()
 Rectangle getBounds(Rectangle rv)
copy->  .getBounds( )
copy->  <Rectangle var>=<Component>.getBounds(<Rectangle rv>);
Store the bounds of this component into "return value" rv and return rv. If rv is null a new Rectangle is allocated. This version of getBounds() is useful if the caller wants to avoid allocating a new Rectangle object on the heap.
Parameters:
rv - the return value, modified to the components bounds
Returns:
rv
 ColorModel getColorModel()
copy->  .getColorModel()
copy->  <ColorModel var>=<Component>.getColorModel();
Gets the instance of ColorModel used to display the component on the output device.
Returns:
The color model used by this component.
Since:
JDK1.0
See Also:
ColorModel, ComponentPeer.getColorModel(), Toolkit.getColorModel()
 Component getComponentAt(int x, int y)
copy->  .getComponentAt(, )
copy->  <Component var>=<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. This method only looks one level deep. If the point (xy) is inside a subcomponent that itself has subcomponents, it does not go looking down the subcomponent tree.

The locate method of Component simply returns the component itself if the (xy) coordinate location is inside its bounding box, and null otherwise.

Parameters:
x - the x coordinate.
y - the y coordinate.
Returns:
the component or subcomponent that contains the (xy) location; null if the location is outside this component.
Since:
JDK1.0
See Also:
contains(int, int)
 Component getComponentAt(Point p)
copy->  .getComponentAt( )
copy->  <Component var>=<Component>.getComponentAt(<Point p>);
Returns the component or subcomponent that contains the specified point.
Parameters:
p - the point.
Since:
JDK1.1
See Also:
contains(int, int)
 ComponentOrientation getComponentOrientation()
copy->  .getComponentOrientation()
copy->  <ComponentOrientation var>=<Component>.getComponentOrientation();
Retrieve the language-sensitive orientation that is to be used to order the elements or text within this component. LayoutManager and Component subclasses that wish to respect orientation should call this method to get the component's orientation before performing layout or drawing.
See Also:
ComponentOrientation
 Cursor getCursor()
copy->  .getCursor()
copy->  <Cursor var>=<Component>.getCursor();
Gets the cursor set in the component. If the component does not have a cursor set, the cursor of its parent is returned. If no Cursor is set in the entire hierarchy, Cursor.DEFAULT_CURSOR is returned.
Since:
JDK1.1
See Also:
setCursor(java.awt.Cursor)
 DropTarget getDropTarget()
copy->  .getDropTarget()
copy->  <DropTarget var>=<Component>.getDropTarget();
Get the DropTarget associated with this Component
 Font getFont()
copy->  .getFont()
copy->  <Font var>=<Component>.getFont();
Gets the font of this component.
Specified by:
getFont in interface MenuContainer
Returns:
This component's font. If a font has not been set for this component, the font of its parent is returned.
Since:
JDK1.0
See Also:
setFont(java.awt.Font)
 FontMetrics getFontMetrics(Font font)
copy->  .getFontMetrics( )
copy->  <FontMetrics var>=<Component>.getFontMetrics(<Font font>);
Gets the font metrics for the specified font.
Parameters:
font - The font for which font metrics is to be obtained.
font - the font.
Returns:
The font metrics for font.
Since:
JDK1.0
See Also:
getFont(), getPeer(), ComponentPeer.getFontMetrics(java.awt.Font), Toolkit.getFontMetrics(java.awt.Font)
 Color getForeground()
copy->  .getForeground()
copy->  <Color var>=<Component>.getForeground();
Gets the foreground color of this component.
Returns:
This component's foreground color. If this component does not have a foreground color, the foreground color of its parent is returned.
Since:
JDK1.0
See Also:
setForeground(java.awt.Color)
 Graphics getGraphics()
copy->  .getGraphics()
copy->  <Graphics var>=<Component>.getGraphics();
Creates a graphics context for this component. This method will return null if this component is currently not displayable.
Returns:
A graphics context for this component, or null if it has none.
Since:
JDK1.0
See Also:
paint(java.awt.Graphics)
 GraphicsConfiguration getGraphicsConfiguration()
copy->  .getGraphicsConfiguration()
copy->  <GraphicsConfiguration var>=<Component>.getGraphicsConfiguration();
Get the GraphicsConfiguration associated with this Component. If the Component has not been assigned a specific GraphicsConfiguration, the GraphicsConfiguration of the Component object's top-level container is returned. If the Component has been created, but not yet added to a Container, this method returns null.
Returns:
the GraphicsConfiguration used by this Component or null
Since:
1.3
 int getHeight()
copy->  .getHeight()
copy->  <int var>=<Component>.getHeight();
Return the current height of this component. This method is preferable to writing component.getBounds().height, or component.getSize().height because it doesn't cause any heap allocations.
Returns:
the current height of this component.
Since:
1.2
 InputContext getInputContext()
copy->  .getInputContext()
copy->  <InputContext var>=<Component>.getInputContext();
Gets the input context used by this component for handling the communication with input methods when text is entered in this component. By default, the input context used for the parent component is returned. Components may override this to return a private input context.
Returns:
The input context used by this component. Null if no context can be determined.
Since:
1.2
 InputMethodRequests getInputMethodRequests()
copy->  .getInputMethodRequests()
copy->  <InputMethodRequests var>=<Component>.getInputMethodRequests();
Gets the input method request handler which supports requests from input methods for this component. A component that supports on-the-spot text input must override this method to return an InputMethodRequests instance. At the same time, it also has to handle input method events.
Returns:
the input method request handler for this component, null by default.
Since:
1.2
See Also:
addInputMethodListener(java.awt.event.InputMethodListener)
 EventListener[] getListeners(Class listenerType)
copy->  .getListeners( )
copy->  <EventListener var>=<Component>.getListeners(<Class listenerType>);
Return an array of all the listeners that were added to the Component with addXXXListener(), where XXX is the name of the listenerType argument. For example, to get all of the MouseListeners for the given Component c, one would write:
 MouseListener[] mls = (MouseListener[])(c.getListeners(MouseListener.class))
 
If no such listener list exists, then an empty array is returned.
Parameters:
listenerType - Type of listeners requested. This parameter must be a java.util.EventListener or subclass.
Throws:
ClassCastException - if the listenerType parameter is not a java.util.EventListener or subclass.
Since:
1.3
 Locale getLocale()
copy->  .getLocale()
copy->  <Locale var>=<Component>.getLocale();
Gets the locale of this component.
Returns:
This component's locale. If this component does not have a locale, the locale of its parent is returned.
Throws:
IllegalComponentStateException - If the Component does not have its own locale and has not yet been added to a containment hierarchy such that the locale can be determined from the containing parent.
Since:
JDK1.1
See Also:
setLocale(java.util.Locale)
 Point getLocation()
copy->  .getLocation()
copy->  <Point var>=<Component>.getLocation();
Gets the location of this component in the form of a point specifying the component's top-left corner. The location will be relative to the parent's coordinate space.

Due to the asynchronous nature of native event handling, this method can return outdated values (for instance, after several calls of setLocation() in rapid succession). For this reason, the recommended method of obtaining a Component's position is within java.awt.event.ComponentListener.componentMoved(), which is called after the operating system has finished moving the Component.

Returns:
An instance of Point representing the top-left corner of the component's bounds in the coordinate space of the component's parent.
Since:
JDK1.1
See Also:
setLocation(int, int), getLocationOnScreen()
 Point getLocation(Point rv)
copy->  .getLocation( )
copy->  <Point var>=<Component>.getLocation(<Point rv>);
Store the x,y origin of this component into "return value" rv and return rv. If rv is null a new Point is allocated. This version of getLocation() is useful if the caller wants to avoid allocating a new Point object on the heap.
Parameters:
rv - the return value, modified to the components location
Returns:
rv
 Point getLocationOnScreen()
copy->  .getLocationOnScreen()
copy->  <Point var>=<Component>.getLocationOnScreen();
Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.
Returns:
An instance of Point representing the top-left corner of the component's bounds in the coordinate space of the screen.
See Also:
setLocation(int, int), getLocation()
 Dimension getMaximumSize()
copy->  .getMaximumSize()
copy->  <Dimension var>=<Component>.getMaximumSize();
Gets the maximum size of this component.
Returns:
A dimension object indicating this component's maximum size.
See Also:
getMinimumSize(), getPreferredSize(), LayoutManager
 Dimension getMinimumSize()
copy->  .getMinimumSize()
copy->  <Dimension var>=<Component>.getMinimumSize();
Gets the mininimum size of this component.
Returns:
A dimension object indicating this component's minimum size.
See Also:
getPreferredSize(), java.awtLayoutManager
 String getName()
copy->  .getName()
copy->  <String var>=<Component>.getName();
Gets the name of the component.
Returns:
This component's name.
Since:
JDK1.1
See Also:
setName(java.lang.String)
 Container getParent()
copy->  .getParent()
copy->  <Container var>=<Component>.getParent();
Gets the parent of this component.
Returns:
The parent container of this component.
Since:
JDK1.0
 java.awt.peer.ComponentPeer getPeer()
copy->  .getPeer()
copy->  <ComponentPeer var>=<Component>.getPeer();
Deprecated. As of JDK version 1.1, programs should not directly manipulate peers. replaced by boolean isDisplayable().

 Dimension getPreferredSize()
copy->  .getPreferredSize()
copy->  <Dimension var>=<Component>.getPreferredSize();
Gets the preferred size of this component.
Returns:
A dimension object indicating this component's preferred size.
See Also:
getMinimumSize(), LayoutManager
 Dimension getSize()
copy->  .getSize()
copy->  <Dimension var>=<Component>.getSize();
Returns the size of this component in the form of a Dimension object. The height field of the Dimension object contains this component's height, and the width field of the Dimension object contains this component's width.
Returns:
A Dimension object that indicates the size of this component.
Since:
JDK1.1
See Also:
setSize(int, int)
 Dimension getSize(Dimension rv)
copy->  .getSize( )
copy->  <Dimension var>=<Component>.getSize(<Dimension rv>);
Store the width/height of this component into "return value" rv and return rv. If rv is null a new Dimension object is allocated. This version of getSize() is useful if the caller wants to avoid allocating a new Dimension object on the heap.
Parameters:
rv - the return value, modified to the components size
Returns:
rv
 Toolkit getToolkit()
copy->  .getToolkit()
copy->  <Toolkit var>=<Component>.getToolkit();
Gets the toolkit of this component. Note that the frame that contains a component controls which toolkit is used by that component. Therefore if the component is moved from one frame to another, the toolkit it uses may change.
Returns:
The toolkit of this component.
Since:
JDK1.0
 Object getTreeLock()
copy->  .getTreeLock()
copy->  <Object var>=<Component>.getTreeLock();
Gets the locking object for AWT component-tree and layout Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
Returns:
This component's locking object.
 int getWidth()
copy->  .getWidth()
copy->  <int var>=<Component>.getWidth();
Return the current width of this component. This method is preferable to writing component.getBounds().width, or component.getSize().width because it doesn't cause any heap allocations.
Returns:
the current width of this component.
Since:
1.2
 int getX()
copy->  .getX()
copy->  <int var>=<Component>.getX();
Return the current x coordinate of the components origin. This method is preferable to writing component.getBounds().x, or component.getLocation().x because it doesn't cause any heap allocations.
Returns:
the current x coordinate of the components origin.
Since:
1.2
 int getY()
copy->  .getY()
copy->  <int var>=<Component>.getY();
Return the current y coordinate of the components origin. This method is preferable to writing component.getBounds().y, or component.getLocation().y because it doesn't cause any heap allocations.
Returns:
the current y coordinate of the components origin.
Since:
1.2
 boolean gotFocus(Event evt,