Save This Page
Home » openjdk-7 » java » awt » [javadoc | source]
java.awt
abstract public class: Component [javadoc | source]
java.lang.Object
   java.awt.Component

All Implemented Interfaces:
    MenuContainer, Serializable, ImageObserver

Direct Known Subclasses:
    SynthTableCellRenderer, Canvas, JTabbedPane, Choice, DateRenderer, JPanel, TestCellRenderer, Button, NoFocusButton, MetalTitlePane, SwatchPanel, DefaultEditor, TextArea, HeavyWeightWindow, DefaultPreviewPanel, SynthComboPopup, JInternalFrame, FileRenderer, IconRenderer, BasicArrowButton, JEditorPane, JMenuItem, DefaultSwatchChooserPanel, JTextField, TaskBar, SynthComboBoxRenderer, SharedOwnerFrame, JComboBox, AlignedLabel, ScrollableTabPanel, JList, JToolTip, ScrollableTabViewport, SynthArrowButton, BasicComboBoxRenderer, ChooserComboPopup, MainSwatchPanel, AbstractColorChooserPanel, JDesktopPane, MetalComboPopup, DefaultCellRenderer, SwatchChooserPanel, JTableHeader, MetalInternalFrameTitlePane, DefaultFrame, RecentSwatchPanel, MetalComboBoxButton, TabContainer, ListEditor, SystemMenuBar, Box, List, JSlider, TextComponent, SynthTreeCellRenderer, ProgressOptionPane, MultiplexingTextField, AbstractButton, SwatchPanel, DoubleRenderer, JFormattedTextField, JToolBar, DefaultTextField, JScrollBar, JProgressBar, JFileChooser, FrameEditorPane, UIResource, BasicComboPopup, JButton, MainSwatchPanel, ColorChooserDialog, JPasswordField, BooleanRenderer, JTextArea, JCheckBox, FilterComboBoxRenderer, DragWindow, SynthBooleanTableCellRenderer, JMenuBar, DefaultListCellRenderer, JPopupMenu, DefaultRGBChooserPanel, JDialog, Dialog, SystemMenuBar, BorderDialog, JColorChooser, JLayeredPane, CroppedEdge, JToggleButton, JScrollPane, JSeparator, DefaultTreeCellRenderer, JWindow, JRadioButton, JOptionPane, JRootPane, UIResource, SynthListCellRenderer, RecentSwatchPanel, JViewport, Checkbox, JDesktopIcon, SynthInternalFrameTitlePane, JTable, UIResource, DefaultHSBChooserPanel, JRadioButtonMenuItem, JMenu, Frame, Container, ConstrainedButton, Separator, NumberEditor, ScrollBar, Separator, MetalScrollButton, JTree, JTextComponent, JSpinner, JCheckBoxMenuItem, Panel, JPopupMenuUIResource, JFrame, BorderlessTextField, JLabel, Filler, DirectoryComboBoxRenderer, JTextPane, JSplitPane, DateEditor, SynthScrollableTabButton, Window, HeaderRenderer, ChooserComboButton, Label, BasicInternalFrameTitlePane, ScrollableTabButton, NumberRenderer, Scrollbar, BorderChooser, TextField, JComponent, DefaultTableCellRenderer

The root of all evil. All graphical representations are subclasses of this giant class, which is designed for screen display and user interaction. This class can be extended directly to build a lightweight component (one not associated with a native window); lightweight components must reside inside a heavyweight window.

This class is Serializable, which has some big implications. A user can save the state of all graphical components in one VM, and reload them in another. Note that this class will only save Serializable listeners, and ignore the rest, without causing any serialization exceptions. However, by making a listener serializable, and adding it to another element, you link in that entire element to the state of this component. To get around this, use the idiom shown in the example below - make listeners non-serializable in inner classes, rather than using this object itself as the listener, if external objects do not need to save the state of this object.

import java.awt.*;
import java.awt.event.*;
import java.io.Serializable;
class MyApp implements Serializable
{
BigObjectThatShouldNotBeSerializedWithAButton bigOne;
// Serializing aButton will not suck in an instance of MyApp, with its
// accompanying field bigOne.
Button aButton = new Button();
class MyActionListener implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
System.out.println("Hello There");
}
}
MyApp()
{
aButton.addActionListener(new MyActionListener());
}
}

Status: Incomplete. The event dispatch mechanism is implemented. All other methods defined in the J2SE 1.3 API javadoc exist, but are mostly incomplete or only stubs; except for methods relating to the Drag and Drop, Input Method, and Accessibility frameworks: These methods are present but commented out.

Nested Class Summary:
class  Component.HeavyweightInLightweightListener  This class fixes the bounds for a Heavyweight component that is placed inside a Lightweight container. When the lightweight is moved or resized, setBounds for the lightweight peer does nothing. Therefore, it was never moved on the screen. This class is attached to the lightweight, and it adjusts the position and size of the peer when notified. This is the same for show and hide. 
abstract protected class  Component.AccessibleAWTComponent  This class provides accessibility support for subclasses of container. 
protected class  Component.BltBufferStrategy  This class provides support for blitting offscreen surfaces to a component. 
protected class  Component.FlipBufferStrategy  This class provides support for flipping component buffers. It can only be used on Canvases and Windows. 
Field Summary
public static final  float TOP_ALIGNMENT    Constant returned by the getAlignmentY method to indicate that the component wishes to be aligned to the top relative to other components. 
public static final  float CENTER_ALIGNMENT    Constant returned by the getAlignmentY and getAlignmentX methods to indicate that the component wishes to be aligned to the center relative to other components. 
public static final  float BOTTOM_ALIGNMENT    Constant returned by the getAlignmentY method to indicate that the component wishes to be aligned to the bottom relative to other components. 
public static final  float RIGHT_ALIGNMENT    Constant returned by the getAlignmentX method to indicate that the component wishes to be aligned to the right relative to other components. 
public static final  float LEFT_ALIGNMENT    Constant returned by the getAlignmentX method to indicate that the component wishes to be aligned to the left relative to other components. 
static final  Object treeLock    Make the treelock a String so that it can easily be identified in debug dumps. We clone the String in order to avoid a conflict in the unlikely event that some other package uses exactly the same string as a lock object. 
 int x    The x position of the component in the parent's coordinate system. 
 int y    The y position of the component in the parent's coordinate system. 
 int width    The component width. 
 int height    The component height. 
 Color foreground    The foreground color for the component. This may be null. 
 Color background    The background color for the component. This may be null. 
 Font font    The default font used in the component. This may be null. 
 Font peerFont    The font in use by the peer, or null if there is no peer.
    serial: the - peer's font
 
 Cursor cursor    The cursor displayed when the pointer is over this component. This may be null. 
 Locale locale    The locale for the component. 
 boolean ignoreRepaint    True if the object should ignore repaint events (usually because it is not showing). 
 boolean visible    True when the object is visible (although it is only showing if all ancestors are likewise visible). For component, this defaults to true. 
 boolean enabled    True if the object is enabled, meaning it can interact with the user. For component, this defaults to true. 
 boolean valid    True if the object is valid. This is set to false any time a size adjustment means the component need to be layed out again. 
 DropTarget dropTarget    The DropTarget for drag-and-drop operations. 
 Vector popups    The list of popup menus for this component. 
 String name    The component's name. May be null, in which case a default name is generated on the first use. 
 boolean nameExplicitlySet    True once the user has set the name. Note that the user may set the name to null. 
 boolean focusable    Indicates if the object can be focused. Defaults to true for components. 
 int isFocusTraversableOverridden    Tracks whether this component's #isFocusTraversable method has been overridden.
    since: 1.4 -
 
 Set[] focusTraversalKeys    The focus traversal keys, if not inherited from the parent or default keyboard focus manager. These sets will contain only AWTKeyStrokes that represent press and release events to use as focus control. 
 boolean focusTraversalKeysEnabled    True if focus traversal keys are enabled. This defaults to true for Component. If this is true, keystrokes in focusTraversalKeys are trapped and processed automatically rather than being passed on to the component. 
 Dimension minSize    Cached information on the minimum size. Should have been transient.
    serial: ignore -
 
 Dimension prefSize    Cached information on the preferred size. Should have been transient.
    serial: ignore -
 
 boolean newEventsOnly    Set to true if an event is to be handled by this component, false if it is to be passed up the hierarcy. 
 long eventMask    Set by subclasses to enable event handling of particular events, and left alone when modifying listeners. For component, this defaults to enabling only input methods. 
 PropertyChangeSupport changeSupport    Describes all registered PropertyChangeListeners. 
 boolean isPacked    True if the component has been packed (layed out).
    serial: true - if this is packed
 
 int componentSerializedDataVersion    The serialization version for this class. Currently at version 4. XXX How do we handle prior versions?
    serial: the - serialization version
 
 AccessibleContext accessibleContext    The accessible context associated with this component. This is only set by subclasses. 
transient  ComponentListener componentListener    Component listener chain. 
transient  FocusListener focusListener    Focus listener chain. 
transient  KeyListener keyListener    Key listener chain. 
transient  MouseListener mouseListener    Mouse listener chain. 
transient  MouseMotionListener mouseMotionListener    Mouse motion listener chain. 
transient  MouseWheelListener mouseWheelListener    Mouse wheel listener chain.
    since: 1.4 -
 
transient  InputMethodListener inputMethodListener    Input method listener chain.
    since: 1.2 -
 
transient  HierarchyListener hierarchyListener    Hierarcy listener chain.
    since: 1.3 -
 
transient  HierarchyBoundsListener hierarchyBoundsListener    Hierarcy bounds listener chain.
    since: 1.3 -
 
transient  Container parent    The parent. 
transient  ComponentPeer peer    The associated native peer. 
transient  ComponentOrientation orientation    The preferred component orientation. 
transient  GraphicsConfiguration graphicsConfig    The associated graphics configuration.
    since: 1.4 -
 
transient  BufferStrategy bufferStrategy    The buffer strategy for repainting.
    since: 1.4 -
 
Constructor:
 protected Component() 
Method from java.awt.Component Summary:
action,   add,   addComponentListener,   addFocusListener,   addHierarchyBoundsListener,   addHierarchyListener,   addInputMethodListener,   addKeyListener,   addMouseListener,   addMouseMotionListener,   addMouseWheelListener,   addNotify,   addPropertyChangeListener,   addPropertyChangeListener,   applyComponentOrientation,   areFocusTraversalKeysSet,   bounds,   checkImage,   checkImage,   coalesceEvents,   contains,   contains,   createImage,   createImage,   createVolatileImage,   createVolatileImage,   deliverEvent,   disable,   disableEvents,   dispatchEvent,   dispatchEventImpl,   doLayout,   enable,   enable,   enableEvents,   enableInputMethods,   eventTypeEnabled,   findNextFocusComponent,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   generateName,   getAccessibleContext,   getAlignmentX,   getAlignmentY,   getBackground,   getBounds,   getBounds,   getColorModel,   getComponentAt,   getComponentAt,   getComponentListeners,   getComponentOrientation,   getCursor,   getDropTarget,   getFocusCycleRootAncestor,   getFocusListeners,   getFocusTraversalKeys,   getFocusTraversalKeysEnabled,   getFont,   getFontMetrics,   getForeground,   getGraphics,   getGraphicsConfiguration,   getGraphicsConfigurationImpl,   getHeight,   getHierarchyBoundsListeners,   getHierarchyListeners,   getIgnoreRepaint,   getInputContext,   getInputMethodListeners,   getInputMethodRequests,   getKeyListeners,   getListeners,   getLocale,   getLocation,   getLocation,   getLocationOnScreen,   getMaximumSize,   getMinimumSize,   getMouseListeners,   getMouseMotionListeners,   getMouseWheelListeners,   getName,   getParent,   getPeer,   getPreferredSize,   getPropertyChangeListeners,   getPropertyChangeListeners,   getSize,   getSize,   getToolkit,   getTreeLock,   getWidth,   getX,   getY,   gotFocus,   handleEvent,   hasFocus,   hide,   imageUpdate,   inside,   invalidate,   isBackgroundSet,   isCursorSet,   isDisplayable,   isDoubleBuffered,   isEnabled,   isFocusCycleRoot,   isFocusOwner,   isFocusTraversable,   isFocusable,   isFontSet,   isForegroundSet,   isLightweight,   isOpaque,   isShowing,   isValid,   isVisible,   keyDown,   keyUp,   layout,   list,   list,   list,   list,   list,   locate,   location,   lostFocus,   minimumSize,   mouseDown,   mouseDrag,   mouseEnter,   mouseExit,   mouseMove,   mouseUp,   move,   nextFocus,   paint,   paintAll,   paramString,   postEvent,   preferredSize,   prepareImage,   prepareImage,   print,   printAll,   processComponentEvent,   processEvent,   processFocusEvent,   processHierarchyBoundsEvent,   processHierarchyEvent,   processInputMethodEvent,   processKeyEvent,   processMouseEvent,   processMouseMotionEvent,   processMouseWheelEvent,   remove,   removeComponentListener,   removeFocusListener,   removeHierarchyBoundsListener,   removeHierarchyListener,   removeInputMethodListener,   removeKeyListener,   removeMouseListener,   removeMouseMotionListener,   removeMouseWheelListener,   removeNotify,   removePropertyChangeListener,   removePropertyChangeListener,   repaint,   repaint,   repaint,   repaint,   requestFocus,   requestFocus,   requestFocusInWindow,   requestFocusInWindow,   reshape,   resize,   resize,   setBackground,   setBounds,   setBounds,   setComponentOrientation,   setCursor,   setDropTarget,   setEnabled,   setFocusTraversalKeys,   setFocusTraversalKeysEnabled,   setFocusable,   setFont,   setForeground,   setIgnoreRepaint,   setLocale,   setLocation,   setLocation,   setName,   setPeer,   setSize,   setSize,   setVisible,   show,   show,   size,   toString,   transferFocus,   transferFocusBackward,   transferFocusUpCycle,   translateEvent,   update,   validate
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.Component Detail:
 public boolean action(Event evt,
    Object what) 
Deprecated! in - classes which support actions, use processActionEvent(ActionEvent) instead

    AWT 1.0 ACTION_EVENT event handler. This method is meant to be overridden by components providing their own action event handler. The default implementation simply returns false.
 public synchronized  void add(PopupMenu popup) 
    Adds the specified popup menu to this component.
 public synchronized  void addComponentListener(ComponentListener listener) 
    Adds the specified listener to this component. This is harmless if the listener is null, but if the listener has already been registered, it will now be registered twice.
 public synchronized  void addFocusListener(FocusListener listener) 
    Adds the specified listener to this component. This is harmless if the listener is null, but if the listener has already been registered, it will now be registered twice.
 public synchronized  void addHierarchyBoundsListener(HierarchyBoundsListener listener) 
    Adds the specified listener to this component. This is harmless if the listener is null, but if the listener has already been registered, it will now be registered twice.
 public synchronized  void addHierarchyListener(HierarchyListener listener) 
    Adds the specified listener to this component. This is harmless if the listener is null, but if the listener has already been registered, it will now be registered twice.
 public synchronized  void addInputMethodListener(InputMethodListener listener) 
    Adds the specified listener to this component. This is harmless if the listener is null, but if the listener has already been registered, it will now be registered twice.
 public synchronized  void addKeyListener(KeyListener listener) 
    Adds the specified listener to this component. This is harmless if the listener is null, but if the listener has already been registered, it will now be registered twice.
 public synchronized  void addMouseListener(MouseListener listener) 
    Adds the specified listener to this component. This is harmless if the listener is null, but if the listener has already been registered, it will now be registered twice.
 public synchronized  void addMouseMotionListener(MouseMotionListener listener) 
    Adds the specified listener to this component. This is harmless if the listener is null, but if the listener has already been registered, it will now be registered twice.
 public synchronized  void addMouseWheelListener(MouseWheelListener listener) 
    Adds the specified listener to this component. This is harmless if the listener is null, but if the listener has already been registered, it will now be registered twice.
 public  void addNotify() 
    Called when the parent of this Component is made visible or when the Component is added to an already visible Container and needs to be shown. A native peer - if any - is created at this time. This method is called automatically by the AWT system and should not be called by user level code.
 public  void addPropertyChangeListener(PropertyChangeListener listener) 
    Adds the specified property listener to this component. This is harmless if the listener is null, but if the listener has already been registered, it will now be registered twice. The property listener ignores inherited properties. Recognized properties include:
    • the font ("font")
    • the background color ("background")
    • the foreground color ("foreground")
    • the focusability ("focusable")
    • the focus key traversal enabled state ("focusTraversalKeysEnabled")
    • the set of forward traversal keys ("forwardFocusTraversalKeys")
    • the set of backward traversal keys ("backwardFocusTraversalKeys")
    • the set of up-cycle traversal keys ("upCycleFocusTraversalKeys")
 public  void addPropertyChangeListener(String propertyName,
    PropertyChangeListener listener) 
    Adds the specified property listener to this component. This is harmless if the listener is null, but if the listener has already been registered, it will now be registered twice. The property listener ignores inherited properties. The listener is keyed to a single property. Recognized properties include:
    • the font ("font")
    • the background color ("background")
    • the foreground color ("foreground")
    • the focusability ("focusable")
    • the focus key traversal enabled state ("focusTraversalKeysEnabled")
    • the set of forward traversal keys ("forwardFocusTraversalKeys")
    • p *
    • the set of backward traversal keys ("backwardFocusTraversalKeys")
    • the set of up-cycle traversal keys ("upCycleFocusTraversalKeys")
 public  void applyComponentOrientation(ComponentOrientation o) 
    Sets the text layout orientation of this component. New components default to UNKNOWN (which behaves like LEFT_TO_RIGHT). This method affects the entire hierarchy, while #setComponentOrientation(ComponentOrientation) affects only the current component.
 public boolean areFocusTraversalKeysSet(int id) 
    Tests whether the focus traversal keys for a given action are explicitly set or inherited.
 public Rectangle bounds() 
Deprecated! use - #getBounds() instead

    Returns a bounding rectangle for this component. Note that the returned rectange is relative to this component's parent, not to the screen.
 public int checkImage(Image image,
    ImageObserver observer) 
    Returns the status of the loading of the specified image. The value returned will be those flags defined in ImageObserver.
 public int checkImage(Image image,
    int width,
    int height,
    ImageObserver observer) 
    Returns the status of the loading of the specified image. The value returned will be those flags defined in ImageObserver.
 protected AWTEvent coalesceEvents(AWTEvent existingEvent,
    AWTEvent newEvent) 
    This is called by the EventQueue if two events with the same event id and owner component are queued. Returns a new combined event, or null if no combining is done. The coelesced events are currently mouse moves (intermediate ones are discarded) and paint events (a merged paint is created in place of the two events).
 public boolean contains(Point p) 
    Tests whether or not the specified point is contained within this component. Coordinates are relative to this component.
 public boolean contains(int x,
    int y) 
    Tests whether or not the specified point is contained within this component. Coordinates are relative to this component.
 public Image createImage(ImageProducer producer) 
    Creates an image from the specified producer.
 public Image createImage(int width,
    int height) 
    Creates an image with the specified width and height for use in double buffering. Headless environments do not support images.
 public VolatileImage createVolatileImage(int width,
    int height) 
    Creates an image with the specified width and height for use in double buffering. Headless environments do not support images.
 public VolatileImage createVolatileImage(int width,
    int height,
    ImageCapabilities caps) throws AWTException 
    Creates an image with the specified width and height for use in double buffering. Headless environments do not support images. The image will support the specified capabilities.
 public  void deliverEvent(Event e) 
Deprecated! use - (AWTEvent) instead

    AWT 1.0 event delivery. Deliver an AWT 1.0 event to this Component. This method simply calls #postEvent .
 public  void disable() 
Deprecated! use - #setEnabled(boolean) instead

    Disables this component.
 protected final  void disableEvents(long eventsToDisable) 
    Disables the specified events. The events to disable are specified by OR-ing together the desired masks from AWTEvent.
 public final  void dispatchEvent(AWTEvent e) 
    Forwards AWT events to processEvent() if:
    • Events have been enabled for this type of event via enableEvents()
    • ,
    • There is at least one registered listener for this type of event
  void dispatchEventImpl(AWTEvent e) 
    Implementation of dispatchEvent. Allows trusted package classes to dispatch additional events first. This implementation first translates e to an AWT 1.0 event and sends the result to #postEvent . If the AWT 1.0 event is not handled, and events of type e are enabled for this component, e is passed on to #processEvent .
 public  void doLayout() 
    Calls the layout manager to re-layout the component. This is called during validation of a container in most cases.
 public  void enable() 
Deprecated! use - #setEnabled(boolean) instead

    Enables this component.
 public  void enable(boolean enabled) 
Deprecated! use - #setEnabled(boolean) instead

    Enables or disables this component.
 protected final  void enableEvents(long eventsToEnable) 
    Enables the specified events. The events to enable are specified by OR-ing together the desired masks from AWTEvent.

    Events are enabled by default when a listener is attached to the component for that event type. This method can be used by subclasses to ensure the delivery of a specified event regardless of whether or not a listener is attached.

 public  void enableInputMethods(boolean enable) 
    Enables or disables input method support for this component. By default, components have this enabled. Input methods are given the opportunity to process key events before this component and its listeners.
 boolean eventTypeEnabled(int type) 
    Tells whether or not an event type is enabled.
 Component findNextFocusComponent(Component child) 
    This method is used to implement transferFocus(). CHILD is the child making the request. This is overridden by Container; when called for an ordinary component there is no child and so we always return null. FIXME: is this still needed, in light of focus traversal policies?
 protected  void firePropertyChange(String propertyName,
    Object oldValue,
    Object newValue) 
    Report a change in a bound property to any registered property listeners.
 protected  void firePropertyChange(String propertyName,
    boolean oldValue,
    boolean newValue) 
    Report a change in a bound property to any registered property listeners.
 protected  void firePropertyChange(String propertyName,
    int oldValue,
    int newValue) 
    Report a change in a bound property to any registered property listeners.
 public  void firePropertyChange(String propertyName,
    byte oldValue,
    byte newValue) 
    Report a change in a bound property to any registered property listeners.
 public  void firePropertyChange(String propertyName,
    char oldValue,
    char newValue) 
    Report a change in a bound property to any registered property listeners.
 public  void firePropertyChange(String propertyName,
    short oldValue,
    short newValue) 
    Report a change in a bound property to any registered property listeners.
 public  void firePropertyChange(String propertyName,
    long oldValue,
    long newValue) 
    Report a change in a bound property to any registered property listeners.
 public  void firePropertyChange(String propertyName,
    float oldValue,
    float newValue) 
    Report a change in a bound property to any registered property listeners.
 public  void firePropertyChange(String propertyName,
    double oldValue,
    double newValue) 
    Report a change in a bound property to any registered property listeners.
 String generateName() 
    Subclasses should override this to return unique component names like "menuitem0".
 public AccessibleContext getAccessibleContext() 
    Returns the accessibility framework context of this class. Component is not accessible, so the default implementation returns null. Subclasses must override this behavior, and return an appropriate subclass of AccessibleAWTComponent .
 public float getAlignmentX() 
 public float getAlignmentY() 
 public Color getBackground() 
    Returns this component's background color. If not set, this is inherited from the parent.
 public Rectangle getBounds() 
    Returns a bounding rectangle for this component. Note that the returned rectange is relative to this component's parent, not to the screen.
 public Rectangle getBounds(Rectangle r) 
    Returns the bounds of this component. This allows reuse of an existing rectangle, if r is non-null.
 public ColorModel getColorModel() 
    Returns the color model of the device this componet is displayed on.
 public Component getComponentAt(Point p) 
    Returns the component occupying the position (x,y). This will either be this component, an immediate child component, or null if neither of the first two occupies the specified location.
 public Component getComponentAt(int x,
    int y) 
    Returns the component occupying the position (x,y). This will either be this component, an immediate child component, or null if neither of the first two occupies the specified location.
 public synchronized ComponentListener[] getComponentListeners() 
    Returns an array of all specified listeners registered on this component.
 public ComponentOrientation getComponentOrientation() 
    Determines the text layout orientation used by this component.
 public Cursor getCursor() 
    Returns the cursor for this component. If not set, this is inherited from the parent, or from Cursor.getDefaultCursor().
 public DropTarget getDropTarget() 
    Gets the associated drag-and-drop target, if there is one.
 public Container getFocusCycleRootAncestor() 
    Returns the root container that owns the focus cycle where this component resides. A focus cycle root is in two cycles, one as the ancestor, and one as the focusable element; this call always returns the ancestor.
 public synchronized FocusListener[] getFocusListeners() 
    Returns an array of all specified listeners registered on this component.
 public Set getFocusTraversalKeys(int id) 
    Returns the set of keys for a given focus traversal action, as defined in setFocusTraversalKeys. If not set, this is inherited from the parent component, which may have gotten it from the KeyboardFocusManager.
 public boolean getFocusTraversalKeysEnabled() 
    Check whether or not focus traversal keys are enabled on this Component. If they are, then the keyboard focus manager consumes and acts on key press and release events that trigger focus traversal, and discards the corresponding key typed events. If focus traversal keys are disabled, then all key events that would otherwise trigger focus traversal are sent to this Component.
 public Font getFont() 
    Returns the font in use for this component. If not set, this is inherited from the parent.
 public FontMetrics getFontMetrics(Font font) 
    Returns the font metrics for the specified font in this component.
 public Color getForeground() 
    Returns this component's foreground color. If not set, this is inherited from the parent.
 public Graphics getGraphics() 
    Returns a graphics object for this component. Returns null if this component is not currently displayed on the screen.
 public GraphicsConfiguration getGraphicsConfiguration() 
    Returns the graphics configuration of this component, if there is one. If it has not been set, it is inherited from the parent.
 GraphicsConfiguration getGraphicsConfigurationImpl() 
    Implementation method that allows classes such as Canvas and Window to override the graphics configuration without violating the published API.
 public int getHeight() 
    Gets the height of the component. This is more efficient than getBounds().height or getSize().height.
 public synchronized HierarchyBoundsListener[] getHierarchyBoundsListeners() 
    Returns an array of all specified listeners registered on this component.
 public synchronized HierarchyListener[] getHierarchyListeners() 
    Returns an array of all specified listeners registered on this component.
 public boolean getIgnoreRepaint() 
    Test whether paint events from the operating system are ignored.
 public InputContext getInputContext() 
    Gets the input context of this component, which is inherited from the parent unless this is overridden.
 public synchronized InputMethodListener[] getInputMethodListeners() 
    Returns an array of all specified listeners registered on this component.
 public InputMethodRequests getInputMethodRequests() 
    Returns the input method request handler, for subclasses which support on-the-spot text input. By default, input methods are handled by AWT, and this returns null.
 public synchronized KeyListener[] getKeyListeners() 
    Returns an array of all specified listeners registered on this component.
 public EventListener[] getListeners(Class listenerType) 
    Returns all registered EventListener s of the given listenerType.
 public Locale getLocale() 
    Returns the locale for this component. If this component does not have a locale, the locale of the parent component is returned.
 public Point getLocation() 
    Returns the location of this component's top left corner relative to its parent component. This may be outdated, so for synchronous behavior, you should use a component listner.
 public Point getLocation(Point p) 
    Returns the location of this component. This allows reuse of an existing point, if p is non-null.
 public Point getLocationOnScreen() 
    Returns the location of this component's top left corner in screen coordinates.
 public Dimension getMaximumSize() 
    Returns the component's maximum size.
 public Dimension getMinimumSize() 
    Returns the component's minimum size.
 public synchronized MouseListener[] getMouseListeners() 
    Returns an array of all specified listeners registered on this component.
 public synchronized MouseMotionListener[] getMouseMotionListeners() 
    Returns an array of all specified listeners registered on this component.
 public synchronized MouseWheelListener[] getMouseWheelListeners() 
    Returns an array of all specified listeners registered on this component.
 public String getName() 
    Returns the name of this component.
 public Container getParent() 
    Returns the parent of this component.
 public ComponentPeer getPeer() 
Deprecated! user - programs should not directly manipulate peers; use #isDisplayable() instead

    Returns the native windowing system peer for this component. Only the platform specific implementation code should call this method.
 public Dimension getPreferredSize() 
    Returns the component's preferred size.
 public PropertyChangeListener[] getPropertyChangeListeners() 
    Returns an array of all specified listeners registered on this component.
 public PropertyChangeListener[] getPropertyChangeListeners(String property) 
    Returns an array of all specified listeners on the named property that are registered on this component.
 public Dimension getSize() 
    Returns the size of this object.
 public Dimension getSize(Dimension d) 
    Returns the size of this component. This allows reuse of an existing dimension, if d is non-null.
 public Toolkit getToolkit() 
    Returns the toolkit in use for this component. The toolkit is associated with the frame this component belongs to.
 public final Object getTreeLock() 
    Returns the object used for synchronization locks on this component when performing tree and layout functions.
 public int getWidth() 
    Gets the width of the component. This is more efficient than getBounds().width or getSize().width.
 public int getX() 
    Gets the x coordinate of the upper left corner. This is more efficient than getBounds().x or getLocation().x.
 public int getY() 
    Gets the y coordinate of the upper left corner. This is more efficient than getBounds().y or getLocation().y.
 public boolean gotFocus(Event evt,
    Object what) 
Deprecated! use - #processFocusEvent(FocusEvent) instead

    AWT 1.0 GOT_FOCUS event handler. This method is meant to be overridden by components providing their own GOT_FOCUS handler. The default implementation simply returns false.
 public boolean handleEvent(Event evt) 
Deprecated! use - #processEvent(AWTEvent) instead

    AWT 1.0 event handler. This method calls one of the event-specific handler methods. For example for key events, either #keyDown(Event,int) or #keyUp(Event,int) is called. A derived component can override one of these event-specific methods if it only needs to handle certain event types. Otherwise it can override handleEvent itself and handle any event.
 public boolean hasFocus() 
    Tests if this component is the focus owner. Use () instead.
 public  void hide() 
Deprecated! use - #setVisible(boolean) instead

    Hides this component so that it is no longer shown on the screen.
 public boolean imageUpdate(Image img,
    int flags,
    int x,
    int y,
    int w,
    int h) 
    Called when an image has changed so that this component is repainted. This incrementally draws an image as more bits are available, when possible. Incremental drawing is enabled if the system property awt.image.incrementalDraw is not present or is true, in which case the redraw rate is set to 100ms or the value of the system property awt.image.redrawrate.

    The coordinate system used depends on the particular flags.

 public boolean inside(int x,
    int y) 
Deprecated! use - #contains(int, int) instead

    Tests whether or not the specified point is contained within this component. Coordinates are relative to this component.
 public  void invalidate() 
    Invalidates this component and all of its parent components. This will cause them to have their layout redone. This is called frequently, so make it fast.
 public boolean isBackgroundSet() 
    Tests if the background was explicitly set, or just inherited from the parent.
 public boolean isCursorSet() 
    Tests if the cursor was explicitly set, or just inherited from the parent.
 public boolean isDisplayable() 
    Tests if the component is displayable. It must be connected to a native screen resource. This reduces to checking that peer is not null. A containment hierarchy is made displayable when a window is packed or made visible.
 public boolean isDoubleBuffered() 
    Checks if this image is painted to an offscreen image buffer that is later copied to screen (double buffering reduces flicker). This version returns false, so subclasses must override it if they provide double buffering.
 public boolean isEnabled() 
    Tests whether or not this component is enabled. Components are enabled by default, and must be enabled to receive user input or generate events.
 public boolean isFocusCycleRoot(Container c) 
    Tests if the container is the ancestor of the focus cycle that this component belongs to.
 public boolean isFocusOwner() 
    Tests if this component is the focus owner.
 public boolean isFocusTraversable() 
Deprecated! use - #isFocusable() instead

    Tests whether or not this component is in the group that can be traversed using the keyboard traversal mechanism (such as the TAB key).
 public boolean isFocusable() 
    Tests if this component can receive focus.
 public boolean isFontSet() 
    Tests if the font was explicitly set, or just inherited from the parent.
 public boolean isForegroundSet() 
    Tests if the foreground was explicitly set, or just inherited from the parent.
 public boolean isLightweight() 
    Return whether the component is lightweight. That means the component has no native peer, but is displayable. This applies to subclasses of Component not in this package, such as javax.swing.
 public boolean isOpaque() 
    Tests if this component is opaque. All "heavyweight" (natively-drawn) components are opaque. A component is opaque if it draws all pixels in the bounds; a lightweight component is partially transparent if it lets pixels underneath show through. Subclasses that guarantee that all pixels will be drawn should override this.
 public boolean isShowing() 
    Tests whether or not this component is actually being shown on the screen. This will be true if and only if it this component is visible and its parent components are all visible.
 public boolean isValid() 
    Tests whether or not this component is valid. A invalid component needs to have its layout redone.
 public boolean isVisible() 
    Tests whether or not this component is visible. Except for top-level frames, components are initially visible.
 public boolean keyDown(Event evt,
    int key) 
Deprecated! use - #processKeyEvent(KeyEvent) instead

    AWT 1.0 KEY_PRESS and KEY_ACTION event handler. This method is meant to be overridden by components providing their own key press handler. The default implementation simply returns false.
 public boolean keyUp(Event evt,
    int key) 
Deprecated! use - #processKeyEvent(KeyEvent) instead

    AWT 1.0 KEY_RELEASE and KEY_ACTION_RELEASE event handler. This method is meant to be overridden by components providing their own key release handler. The default implementation simply returns false.
 public  void layout() 
Deprecated! use - #doLayout() instead

    Calls the layout manager to re-layout the component. This is called during validation of a container in most cases.
 public  void list() 
    Prints a listing of this component to System.out.
 public  void list(PrintStream out) 
    Prints a listing of this component to the specified print stream.
 public  void list(PrintWriter out) 
    Prints a listing of this component to the specified print writer.
 public  void list(PrintStream out,
    int indent) 
    Prints a listing of this component to the specified print stream, starting at the specified indentation point.
 public  void list(PrintWriter out,
    int indent) 
    Prints a listing of this component to the specified print writer, starting at the specified indentation point.
 public Component locate(int x,
    int y) 
Deprecated! use - #getComponentAt(int, int) instead

    Returns the component occupying the position (x,y). This will either be this component, an immediate child component, or null if neither of the first two occupies the specified location.
 public Point location() 
Deprecated! use - #getLocation() instead

    Returns the location of this component's top left corner relative to its parent component.
 public boolean lostFocus(Event evt,
    Object what) 
Deprecated! use - #processFocusEvent(FocusEvent) instead

    AWT 1.0 LOST_FOCUS event handler. This method is meant to be overridden by components providing their own LOST_FOCUS handler. The default implementation simply returns false.
 public Dimension minimumSize() 
Deprecated! use - #getMinimumSize() instead

    Returns the component's minimum size.
 public boolean mouseDown(Event evt,
    int x,
    int y) 
Deprecated! use - #processMouseEvent(MouseEvent) instead

    AWT 1.0 MOUSE_DOWN event handler. This method is meant to be overridden by components providing their own MOUSE_DOWN handler. The default implementation simply returns false.
 public boolean mouseDrag(Event evt,
    int x,
    int y) 
Deprecated! use - #processMouseMotionEvent(MouseEvent) instead

    AWT 1.0 MOUSE_DRAG event handler. This method is meant to be overridden by components providing their own MOUSE_DRAG handler. The default implementation simply returns false.
 public boolean mouseEnter(Event evt,
    int x,
    int y) 
Deprecated! use - #processMouseEvent(MouseEvent) instead

    AWT 1.0 MOUSE_ENTER event handler. This method is meant to be overridden by components providing their own MOUSE_ENTER handler. The default implementation simply returns false.
 public boolean mouseExit(Event evt,
    int x,
    int y) 
Deprecated! use - #processMouseEvent(MouseEvent) instead

    AWT 1.0 MOUSE_EXIT event handler. This method is meant to be overridden by components providing their own MOUSE_EXIT handler. The default implementation simply returns false.
 public boolean mouseMove(Event evt,
    int x,
    int y) 
Deprecated! use - #processMouseMotionEvent(MouseEvent) instead

    AWT 1.0 MOUSE_MOVE event handler. This method is meant to be overridden by components providing their own MOUSE_MOVE handler. The default implementation simply returns false.
 public boolean mouseUp(Event evt,
    int x,
    int y) 
Deprecated! use - #processMouseEvent(MouseEvent) instead

    AWT 1.0 MOUSE_UP event handler. This method is meant to be overridden by components providing their own MOUSE_UP handler. The default implementation simply returns false.
 public  void move(int x,
    int y) 
Deprecated! use - #setLocation(int, int) instead

    Moves this component to the specified location, relative to the parent's coordinates. The coordinates are the new upper left corner of this component.
 public  void nextFocus() 
Deprecated! use - () instead

    AWT 1.0 focus event processor. Transfers focus to the next component in the focus traversal order, as though this were the current focus owner.
 public  void paint(Graphics g) 
    Paints this component on the screen. The clipping region in the graphics context will indicate the region that requires painting. This is called whenever the component first shows, or needs to be repaired because something was temporarily drawn on top. It is not necessary for subclasses to call super.paint(g). Components with no area are not painted.
 public  void paintAll(Graphics g) 
    Paints this entire component, including any sub-components.
 protected String paramString() 
    Returns a debugging string representing this component. The string may be empty but not null.
 public boolean postEvent(Event e) 
Deprecated! use - #dispatchEvent(AWTEvent) instead

    AWT 1.0 event handler. This method simply calls handleEvent and returns the result.
 public Dimension preferredSize() 
Deprecated! use - #getPreferredSize() instead

    Returns the component's preferred size.
 public boolean prepareImage(Image image,
    ImageObserver observer) 
    Prepares the specified image for rendering on this component.
 public boolean prepareImage(Image image,
    int width,
    int height,
    ImageObserver observer) 
    Prepares the specified image for rendering on this component at the specified scaled width and height
 public  void print(Graphics g) 
    Prints this component. This method is provided so that printing can be done in a different manner from painting. However, the implementation in this class simply calls the paint() method.
 public  void printAll(Graphics g) 
    Prints this component, including all sub-components. This method is provided so that printing can be done in a different manner from painting. However, the implementation in this class simply calls the paintAll() method.
 protected  void processComponentEvent(ComponentEvent e) 
    Called when a component event is dispatched and component events are enabled. This method passes the event along to any listeners that are attached.
 protected  void processEvent(AWTEvent e) 
    Processes the specified event. In this class, this method simply calls one of the more specific event handlers.
 protected  void processFocusEvent(FocusEvent e) 
    Called when a focus event is dispatched and component events are enabled. This method passes the event along to any listeners that are attached.
 protected  void processHierarchyBoundsEvent(HierarchyEvent e) 
    Called when a hierarchy bounds event is dispatched and component events are enabled. This method passes the event along to any listeners that are attached.
 protected  void processHierarchyEvent(HierarchyEvent e) 
    Called when a hierarchy change event is dispatched and component events are enabled. This method passes the event along to any listeners that are attached.
 protected  void processInputMethodEvent(InputMethodEvent e) 
    Called when an input method event is dispatched and component events are enabled. This method passes the event along to any listeners that are attached.
 protected  void processKeyEvent(KeyEvent e) 
    Called when a key event is dispatched and component events are enabled. This method passes the event along to any listeners that are attached.
 protected  void processMouseEvent(MouseEvent e) 
    Called when a regular mouse event is dispatched and component events are enabled. This method passes the event along to any listeners that are attached.
 protected  void processMouseMotionEvent(MouseEvent e) 
    Called when a mouse motion event is dispatched and component events are enabled. This method passes the event along to any listeners that are attached.
 protected  void processMouseWheelEvent(MouseWheelEvent e) 
    Called when a mouse wheel event is dispatched and component events are enabled. This method passes the event along to any listeners that are attached.
 public synchronized  void remove(MenuComponent popup) 
    Removes the specified popup menu from this component.
 public synchronized  void removeComponentListener(ComponentListener listener) 
    Removes the specified listener from the component. This is harmless if the listener was not previously registered.
 public synchronized  void removeFocusListener(FocusListener listener) 
    Removes the specified listener from the component. This is harmless if the listener was not previously registered.
 public synchronized  void removeHierarchyBoundsListener(HierarchyBoundsListener listener) 
    Removes the specified listener from the component. This is harmless if the listener was not previously registered.
 public synchronized  void removeHierarchyListener(HierarchyListener listener) 
    Removes the specified listener from the component. This is harmless if the listener was not previously registered.
 public synchronized  void removeInputMethodListener(InputMethodListener listener) 
    Removes the specified listener from the component. This is harmless if the listener was not previously registered.
 public synchronized  void removeKeyListener(KeyListener listener) 
    Removes the specified listener from the component. This is harmless if the listener was not previously registered.
 public synchronized  void removeMouseListener(MouseListener listener) 
    Removes the specified listener from the component. This is harmless if the listener was not previously registered.
 public synchronized  void removeMouseMotionListener(MouseMotionListener listener) 
    Removes the specified listener from the component. This is harmless if the listener was not previously registered.
 public synchronized  void removeMouseWheelListener(MouseWheelListener listener) 
    Removes the specified listener from the component. This is harmless if the listener was not previously registered.
 public  void removeNotify() 
    Called to inform this component is has been removed from its container. Its native peer - if any - is destroyed at this time. This method is called automatically by the AWT system and should not be called by user level code.
 public  void removePropertyChangeListener(PropertyChangeListener listener) 
    Removes the specified property listener from the component. This is harmless if the listener was not previously registered.
 public  void removePropertyChangeListener(String propertyName,
    PropertyChangeListener listener) 
    Removes the specified property listener on a particular property from the component. This is harmless if the listener was not previously registered.
 public  void repaint() 
    Repaint this entire component. The update() method on this component will be called as soon as possible.
 public  void repaint(long tm) 
    Repaint this entire component. The update() method on this component will be called in approximate the specified number of milliseconds.
 public  void repaint(int x,
    int y,
    int w,
    int h) 
    Repaints the specified rectangular region within this component. The update method on this component will be called as soon as possible. The coordinates are relative to this component.
 public  void repaint(long tm,
    int x,
    int y,
    int width,
    int height) 
    Repaints the specified rectangular region within this component. The update method on this component will be called in approximately the specified number of milliseconds. The coordinates are relative to this component.
 public  void requestFocus() 
    Request that this Component be given the keyboard input focus and that its top-level ancestor become the focused Window. For the request to be granted, the Component must be focusable, displayable and showing and the top-level Window to which it belongs must be focusable. If the request is initially denied on the basis that the top-level Window is not focusable, the request will be remembered and granted when the Window does become focused. Never assume that this Component is the focus owner until it receives a FOCUS_GAINED event. The behaviour of this method is platform-dependent. #requestFocusInWindow() should be used instead.
 protected boolean requestFocus(boolean temporary) 
    Request that this Component be given the keyboard input focus and that its top-level ancestor become the focused Window. For the request to be granted, the Component must be focusable, displayable and showing and the top-level Window to which it belongs must be focusable. If the request is initially denied on the basis that the top-level Window is not focusable, the request will be remembered and granted when the Window does become focused. Never assume that this Component is the focus owner until it receives a FOCUS_GAINED event. The behaviour of this method is platform-dependent. #requestFocusInWindow() should be used instead. If the return value is false, the request is guaranteed to fail. If the return value is true, the request will succeed unless it is vetoed or something in the native windowing system intervenes, preventing this Component's top-level ancestor from becoming focused. This method is meant to be called by derived lightweight Components that want to avoid unnecessary repainting when they know a given focus transfer need only be temporary.
 public boolean requestFocusInWindow() 
    Request that this component be given the keyboard input focus, if its top-level ancestor is the currently focused Window. A FOCUS_GAINED event will be fired if and only if this request is successful. To be successful, the component must be displayable, showing, and focusable, and its ancestor top-level Window must be focused. If the return value is false, the request is guaranteed to fail. If the return value is true, the request will succeed unless it is vetoed or something in the native windowing system intervenes, preventing this Component's top-level ancestor from becoming focused.
 protected boolean requestFocusInWindow(boolean temporary) 
    Request that this component be given the keyboard input focus, if its top-level ancestor is the currently focused Window. A FOCUS_GAINED event will be fired if and only if this request is successful. To be successful, the component must be displayable, showing, and focusable, and its ancestor top-level Window must be focused. If the return value is false, the request is guaranteed to fail. If the return value is true, the request will succeed unless it is vetoed or something in the native windowing system intervenes, preventing this Component's top-level ancestor from becoming focused. This method is meant to be called by derived lightweight Components that want to avoid unnecessary repainting when they know a given focus transfer need only be temporary.
 public  void reshape(int x,
    int y,
    int width,
    int height) 
Deprecated! use - #setBounds(int, int, int, int) instead

    Sets the bounding rectangle for this component to the specified values. Note that these coordinates are relative to the parent, not to the screen.
 public  void resize(Dimension d) 
Deprecated! use - #setSize(Dimension) instead

    Sets the size of this component to the specified value.
 public  void resize(int width,
    int height) 
Deprecated! use - #setSize(int, int) instead

    Sets the size of this component to the specified value.
 public  void setBackground(Color c) 
    Sets this component's background color to the specified color. The parts of the component affected by the background color may by system dependent. This is a bound property.
 public  void setBounds(Rectangle r) 
    Sets the bounding rectangle for this component to the specified rectangle. Note that these coordinates are relative to the parent, not to the screen.
 public  void setBounds(int x,
    int y,
    int w,
    int h) 
    Sets the bounding rectangle for this component to the specified values. Note that these coordinates are relative to the parent, not to the screen.
 public  void setComponentOrientation(ComponentOrientation o) 
    Sets the text layout orientation of this component. New components default to UNKNOWN (which behaves like LEFT_TO_RIGHT). This method affects only the current component, while #applyComponentOrientation(ComponentOrientation) affects the entire hierarchy.
 public  void setCursor(Cursor cursor) 
    Sets the cursor for this component to the specified cursor. The cursor is displayed when the point is contained by the component, and the component is visible, displayable, and enabled. This is inherited by subcomponents unless they set their own cursor.
 public  void setDropTarget(DropTarget dt) 
    Set the associated drag-and-drop target, which receives events when this is enabled.
 public  void setEnabled(boolean enabled) 
    Enables or disables this component. The component must be enabled to receive events (except that lightweight components always receive mouse events).
 public  void setFocusTraversalKeys(int id,
    Set keystrokes) 
    Sets the focus traversal keys for one of the three focus traversal directions supported by Components: KeyboardFocusManager#FORWARD_TRAVERSAL_KEYS , KeyboardFocusManager#BACKWARD_TRAVERSAL_KEYS , or KeyboardFocusManager#UP_CYCLE_TRAVERSAL_KEYS . Normally, the default values should match the operating system's native choices. To disable a given traversal, use Collections.EMPTY_SET. The event dispatcher will consume PRESSED, RELEASED, and TYPED events for the specified key, although focus can only transfer on PRESSED or RELEASED.

    The defaults are:
    IdentifierMeaningDefault
    KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS Normal forward traversal TAB on KEY_PRESSED, Ctrl-TAB on KEY_PRESSED
    KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS Normal backward traversal Shift-TAB on KEY_PRESSED, Ctrl-Shift-TAB on KEY_PRESSED
    KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS Go up a traversal cycleNone
    If keystrokes is null, this component's focus traversal key set is inherited from one of its ancestors. If none of its ancestors has its own set of focus traversal keys, the focus traversal keys are set to the defaults retrieved from the current KeyboardFocusManager. If not null, the set must contain only AWTKeyStrokes that are not already focus keys and are not KEY_TYPED events.

 public  void setFocusTraversalKeysEnabled(boolean focusTraversalKeysEnabled) 
    Enable or disable focus traversal keys on this Component. If they are, then the keyboard focus manager consumes and acts on key press and release events that trigger focus traversal, and discards the corresponding key typed events. If focus traversal keys are disabled, then all key events that would otherwise trigger focus traversal are sent to this Component.
 public  void setFocusable(boolean focusable) 
 public  void setFont(Font newFont) 
    Sets the font for this component to the specified font. This is a bound property.
 public  void setForeground(Color c) 
    Sets this component's foreground color to the specified color. This is a bound property.
 public  void setIgnoreRepaint(boolean ignoreRepaint) 
    Sets whether paint messages delivered by the operating system should be ignored. This does not affect messages from AWT, except for those triggered by OS messages. Setting this to true can allow faster performance in full-screen mode or page-flipping.
 public  void setLocale(Locale newLocale) 
    Sets the locale for this component to the specified locale. This is a bound property.
 public  void setLocation(Point p) 
    Moves this component to the specified location, relative to the parent's coordinates. The coordinates are the new upper left corner of this component.
 public  void setLocation(int x,
    int y) 
    Moves this component to the specified location, relative to the parent's coordinates. The coordinates are the new upper left corner of this component.
 public  void setName(String name) 
    Sets the name of this component to the specified name.
 final  void setPeer(ComponentPeer peer) 
    Sets the peer for this component.
 public  void setSize(Dimension d) 
    Sets the size of this component to the specified value.
 public  void setSize(int width,
    int height) 
    Sets the size of this component to the specified width and height.
 public  void setVisible(boolean visible) 
    Makes this component visible or invisible. Note that it wtill might not show the component, if a parent is invisible.
 public  void show() 
Deprecated! use - #setVisible(boolean) instead

    Makes this component visible on the screen.
 public  void show(boolean visible) 
Deprecated! use - #setVisible(boolean) instead

    Makes this component visible or invisible.
 public Dimension size() 
Deprecated! use - #getSize() instead

    Returns the size of this object.
 public String toString() 
    Returns a string representation of this component. This is implemented as getClass().getName() + '[' + paramString() + ']'.
 public  void transferFocus() 
    Transfers focus to the next component in the focus traversal order, as though this were the current focus owner.
 public  void transferFocusBackward() 
    Transfers focus to the previous component in the focus traversal order, as though this were the current focus owner.
 public  void transferFocusUpCycle() 
    Transfers focus to the focus cycle root of this component. However, if this is a Window, the default focus owner in the window in the current focus cycle is focused instead.
 static Event translateEvent(AWTEvent e) 
    Translate an AWT 1.1 event (AWTEvent ) into an AWT 1.0 event (Event ).
 public  void update(Graphics g) 
    Updates this component. This is called in response to repaint. This method fills the component with the background color, then sets the foreground color of the specified graphics context to the foreground color of this component and calls the paint() method. The coordinates of the graphics are relative to this component. Subclasses should call either super.update(g) or paint(g).
 public  void validate() 
    Called to ensure that the layout for this component is valid. This is usually called on containers.