java.awt

Class Component

  • java.lang.Object
    • java.awt.Component
  • All Implemented Interfaces:
    java.awt.image.ImageObserver, MenuContainer, java.io.Serializable
    Direct Known Subclasses:
    Button, Canvas, Checkbox, Choice, Container, Label, List, Scrollbar, TextComponent
    public abstract class Component extends java.lang.Object implements java.awt.image.ImageObserver, MenuContainer, java.io.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 window. On the contrary, a heavyweight component is associated with a native window. The isLightweight() method may be used to distinguish between the two kinds of the components.

    Lightweight and heavyweight components may be mixed in a single component hierarchy. However, for correct operating of such a mixed hierarchy of components, the whole hierarchy must be valid. When the hierarchy gets invalidated, like after changing the bounds of components, or adding/removing components to/from containers, the whole hierarchy must be validated afterwards by means of the Container.validate() method invoked on the top-most invalid container of the hierarchy.

    Serialization

    It is important to note that only AWT listeners which conform to the Serializable protocol will be saved when the object is stored. If an AWT object has listeners that aren't marked serializable, they will be dropped at writeObject time. Developers will need, as always, to consider the implications of making an object serializable. One situation to watch out for is this:
        import java.awt.*;
        import java.awt.event.*;
        import java.io.Serializable;
    
        class MyApp implements ActionListener, Serializable
        {
            BigObjectThatShouldNotBeSerializedWithAButton bigOne;
            Button aButton = new Button();
    
            MyApp()
            {
                // Oops, now aButton has a listener with a reference
                // to bigOne!
                aButton.addActionListener(this);
            }
    
            public void actionPerformed(ActionEvent e)
            {
                System.out.println("Hello There");
            }
        }
     
    In this example, serializing aButton by itself will cause MyApp and everything it refers to to be serialized as well. The problem is that the listener is serializable by coincidence, not by design. To separate the decisions about MyApp and the ActionListener being serializable one can use a nested class, as in the following example:
        import java.awt.*;
        import java.awt.event.*;
        import java.io.Serializable;
    
        class MyApp implements java.io.Serializable
        {
             BigObjectThatShouldNotBeSerializedWithAButton bigOne;
             Button aButton = new Button();
    
             static class MyActionListener implements ActionListener
             {
                 public void actionPerformed(ActionEvent e)
                 {
                     System.out.println("Hello There");
                 }
             }
    
             MyApp()
             {
                 aButton.addActionListener(new MyActionListener());
             }
        }
     

    Note: For more information on the paint mechanisms utilitized by AWT and Swing, including information on how to write the most efficient painting code, see Painting in AWT and Swing.

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

    See Also:
    Serialized Form
    • Nested Classes 
      Modifier and Type Class and Description
      Ordinary member indicator BaselineResizeBehavior Reveal DetailHide Detail
      Enumeration of the common ways the baseline of a component can change as the size changes.
    • Fields 
      Modifier and Type Field and Description
      Inherited member indicator ABORT Reveal DetailHide Detail
      This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously was aborted before production was complete.
      Inherited member indicator ALLBITS Reveal DetailHide Detail
      This flag in the infoflags argument to imageUpdate indicates that a static image which was previously drawn is now complete and can be drawn again in its final form.
      Ordinary member indicator BOTTOM_ALIGNMENT Reveal DetailHide Detail
      Ease-of-use constant for getAlignmentY.
      Ordinary member indicator CENTER_ALIGNMENT Reveal DetailHide Detail
      Ease-of-use constant for getAlignmentY and getAlignmentX.
      Inherited member indicator ERROR Reveal DetailHide Detail
      This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously has encountered an error.
      Inherited member indicator FRAMEBITS Reveal DetailHide Detail
      This flag in the infoflags argument to imageUpdate indicates that another complete frame of a multi-frame image which was previously drawn is now available to be drawn again.
      Inherited member indicator HEIGHT Reveal DetailHide Detail
      This flag in the infoflags argument to imageUpdate indicates that the height of the base image is now available and can be taken from the height argument to the imageUpdate callback method.
      Ordinary member indicator LEFT_ALIGNMENT Reveal DetailHide Detail
      Ease-of-use constant for getAlignmentX.
      Inherited member indicator PROPERTIES Reveal DetailHide Detail
      This flag in the infoflags argument to imageUpdate indicates that the properties of the image are now available.
      Ordinary member indicator RIGHT_ALIGNMENT Reveal DetailHide Detail
      Ease-of-use constant for getAlignmentX.
      Inherited member indicator SOMEBITS Reveal DetailHide Detail
      This flag in the infoflags argument to imageUpdate indicates that more pixels needed for drawing a scaled variation of the image are available.
      Ordinary member indicator TOP_ALIGNMENT Reveal DetailHide Detail
      Ease-of-use constant for getAlignmentY().
      Inherited member indicator WIDTH Reveal DetailHide Detail
      This flag in the infoflags argument to imageUpdate indicates that the width of the base image is now available and can be taken from the width argument to the imageUpdate callback method.
      • Basic Attribute Methods 
        Modifier and Type Method and Description
        Ordinary member indicator applyComponentOrientation Reveal DetailHide Detail
        Sets the ComponentOrientation property of this component and all components contained within it.
        Ordinary member indicator disable Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
        Ordinary member indicator enable Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
        Ordinary member indicator enable Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
        Ordinary member indicator enableInputMethods Reveal DetailHide Detail
        Enables or disables input method support for this component.
        Ordinary member indicator getAccessibleContext Reveal DetailHide Detail
        Gets the AccessibleContext associated with this Component.
        Ordinary member indicator getBackground Reveal DetailHide Detail
        Gets the background color of this component.
        Ordinary member indicator getColorModel Reveal DetailHide Detail
        Gets the instance of ColorModel used to display the component on the output device.
        Ordinary member indicator getComponentOrientation Reveal DetailHide Detail
        Retrieves the language-sensitive orientation that is to be used to order the elements or text within this component.
        Ordinary member indicator getCursor Reveal DetailHide Detail
        Gets the cursor set in the component.
        Ordinary member indicator getFont Reveal DetailHide Detail
        Gets the font of this component.
        Ordinary member indicator getForeground Reveal DetailHide Detail
        Gets the foreground color of this component.
        Ordinary member indicator getLocale Reveal DetailHide Detail
        Gets the locale of this component.
        Ordinary member indicator getName Reveal DetailHide Detail
        Gets the name of the component.
        Ordinary member indicator getParent Reveal DetailHide Detail
        Gets the parent of this component.
        Ordinary member indicator hide Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
        Ordinary member indicator isBackgroundSet Reveal DetailHide Detail
        Returns whether the background color has been explicitly set for this Component.
        Ordinary member indicator isCursorSet Reveal DetailHide Detail
        Returns whether the cursor has been explicitly set for this Component.
        Ordinary member indicator isDisplayable Reveal DetailHide Detail
        Determines whether this component is displayable.
        Ordinary member indicator isDoubleBuffered Reveal DetailHide Detail
        Returns true if this component is painted to an offscreen image ("buffer") that's copied to the screen later.
        Ordinary member indicator isEnabled Reveal DetailHide Detail
        Determines whether this component is enabled.
        Ordinary member indicator isFontSet Reveal DetailHide Detail
        Returns whether the font has been explicitly set for this Component.
        Ordinary member indicator isForegroundSet Reveal DetailHide Detail
        Returns whether the foreground color has been explicitly set for this Component.
        Ordinary member indicator isLightweight Reveal DetailHide Detail
        A lightweight component doesn't have a native toolkit peer.
        Ordinary member indicator isOpaque Reveal DetailHide Detail
        Returns true if this component is completely opaque, returns false by default.
        Ordinary member indicator isShowing Reveal DetailHide Detail
        Determines whether this component is showing on screen.
        Ordinary member indicator isVisible Reveal DetailHide Detail
        Determines whether this component should be visible when its parent is visible.
        Ordinary member indicator setBackground Reveal DetailHide Detail
        Sets the background color of this component.
        Ordinary member indicator setComponentOrientation Reveal DetailHide Detail
        Sets the language-sensitive orientation that is to be used to order the elements or text within this component.
        Ordinary member indicator setCursor Reveal DetailHide Detail
        Sets the cursor image to the specified cursor.
        Ordinary member indicator setEnabled Reveal DetailHide Detail
        Enables or disables this component, depending on the value of the parameter b.
        Ordinary member indicator setFont Reveal DetailHide Detail
        Sets the font of this component.
        Ordinary member indicator setForeground Reveal DetailHide Detail
        Sets the foreground color of this component.
        Ordinary member indicator setLocale Reveal DetailHide Detail
        Sets the locale of this component.
        Ordinary member indicator setName Reveal DetailHide Detail
        Sets the name of the component to the specified string.
        Ordinary member indicator setVisible Reveal DetailHide Detail
        Shows or hides this component depending on the value of parameter b.
        Ordinary member indicator show Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
        Ordinary member indicator show Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
      • Event Support Methods 
        Modifier and Type Method and Description
        Ordinary member indicator action Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, should register this component as ActionListener on component which fires action events.
        Ordinary member indicator deliverEvent Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e).
        Ordinary member indicator dispatchEvent Reveal DetailHide Detail
        Dispatches an event to this component or one of its sub components.
        Ordinary member indicator firePropertyChange Reveal DetailHide Detail
        Reports a bound property change.
        Ordinary member indicator firePropertyChange Reveal DetailHide Detail
        Reports a bound property change.
        Ordinary member indicator firePropertyChange Reveal DetailHide Detail
        Reports a bound property change.
        Ordinary member indicator firePropertyChange Reveal DetailHide Detail
        Reports a bound property change.
        Ordinary member indicator firePropertyChange Reveal DetailHide Detail
        Reports a bound property change.
        Ordinary member indicator firePropertyChange Reveal DetailHide Detail
        Reports a bound property change.
        Ordinary member indicator getListeners Reveal DetailHide Detail
        Returns an array of all the objects currently registered as FooListeners upon this Component.
        Ordinary member indicator handleEvent Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1 replaced by processEvent(AWTEvent).
        Ordinary member indicator keyDown Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
        Ordinary member indicator keyUp Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
        Ordinary member indicator mouseDown Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        Ordinary member indicator mouseDrag Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
        Ordinary member indicator mouseEnter Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        Ordinary member indicator mouseExit Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        Ordinary member indicator mouseMove Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
        Ordinary member indicator mouseUp Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        Ordinary member indicator postEvent Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).
      • Event Registration Methods 
        Modifier and Type Method and Description
        Ordinary member indicator addComponentListener Reveal DetailHide Detail
        Adds the specified component listener to receive component events from this component.
        Ordinary member indicator addFocusListener Reveal DetailHide Detail
        Adds the specified focus listener to receive focus events from this component when this component gains input focus.
        Ordinary member indicator addHierarchyBoundsListener Reveal DetailHide Detail
        Adds the specified hierarchy bounds listener to receive hierarchy bounds events from this component when the hierarchy to which this container belongs changes.
        Ordinary member indicator addHierarchyListener Reveal DetailHide Detail
        Adds the specified hierarchy listener to receive hierarchy changed events from this component when the hierarchy to which this container belongs changes.
        Ordinary member indicator addInputMethodListener Reveal DetailHide Detail
        Adds the specified input method listener to receive input method events from this component.
        Ordinary member indicator addKeyListener Reveal DetailHide Detail
        Adds the specified key listener to receive key events from this component.
        Ordinary member indicator addMouseListener Reveal DetailHide Detail
        Adds the specified mouse listener to receive mouse events from this component.
        Ordinary member indicator addMouseMotionListener Reveal DetailHide Detail
        Adds the specified mouse motion listener to receive mouse motion events from this component.
        Ordinary member indicator addMouseWheelListener Reveal DetailHide Detail
        Adds the specified mouse wheel listener to receive mouse wheel events from this component.
        Ordinary member indicator addPropertyChangeListener Reveal DetailHide Detail
        Adds a PropertyChangeListener to the listener list.
        Ordinary member indicator addPropertyChangeListener Reveal DetailHide Detail
        Adds a PropertyChangeListener to the listener list for a specific property.
        Ordinary member indicator getComponentListeners Reveal DetailHide Detail
        Returns an array of all the component listeners registered on this component.
        Ordinary member indicator getFocusListeners Reveal DetailHide Detail
        Returns an array of all the focus listeners registered on this component.
        Ordinary member indicator getHierarchyBoundsListeners Reveal DetailHide Detail
        Returns an array of all the hierarchy bounds listeners registered on this component.
        Ordinary member indicator getHierarchyListeners Reveal DetailHide Detail
        Returns an array of all the hierarchy listeners registered on this component.
        Ordinary member indicator getInputMethodListeners Reveal DetailHide Detail
        Returns an array of all the input method listeners registered on this component.
        Ordinary member indicator getKeyListeners Reveal DetailHide Detail
        Returns an array of all the key listeners registered on this component.
        Ordinary member indicator getMouseListeners Reveal DetailHide Detail
        Returns an array of all the mouse listeners registered on this component.
        Ordinary member indicator getMouseMotionListeners Reveal DetailHide Detail
        Returns an array of all the mouse motion listeners registered on this component.
        Ordinary member indicator getMouseWheelListeners Reveal DetailHide Detail
        Returns an array of all the mouse wheel listeners registered on this component.
        Ordinary member indicator getPropertyChangeListeners Reveal DetailHide Detail
        Returns an array of all the property change listeners registered on this component.
        Ordinary member indicator getPropertyChangeListeners Reveal DetailHide Detail
        Returns an array of all the listeners which have been associated with the named property.
        Ordinary member indicator removeComponentListener Reveal DetailHide Detail
        Removes the specified component listener so that it no longer receives component events from this component.
        Ordinary member indicator removeFocusListener Reveal DetailHide Detail
        Removes the specified focus listener so that it no longer receives focus events from this component.
        Ordinary member indicator removeHierarchyBoundsListener Reveal DetailHide Detail
        Removes the specified hierarchy bounds listener so that it no longer receives hierarchy bounds events from this component.
        Ordinary member indicator removeHierarchyListener Reveal DetailHide Detail
        Removes the specified hierarchy listener so that it no longer receives hierarchy changed events from this component.
        Ordinary member indicator removeInputMethodListener Reveal DetailHide Detail
        Removes the specified input method listener so that it no longer receives input method events from this component.
        Ordinary member indicator removeKeyListener Reveal DetailHide Detail
        Removes the specified key listener so that it no longer receives key events from this component.
        Ordinary member indicator removeMouseListener Reveal DetailHide Detail
        Removes the specified mouse listener so that it no longer receives mouse events from this component.
        Ordinary member indicator removeMouseMotionListener Reveal DetailHide Detail
        Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component.
        Ordinary member indicator removeMouseWheelListener Reveal DetailHide Detail
        Removes the specified mouse wheel listener so that it no longer receives mouse wheel events from this component.
        Ordinary member indicator removePropertyChangeListener Reveal DetailHide Detail
        Removes a PropertyChangeListener from the listener list.
        Ordinary member indicator removePropertyChangeListener Reveal DetailHide Detail
        Removes a PropertyChangeListener from the listener list for a specific property.
      • Keyboard Focus Methods 
        Modifier and Type Method and Description
        Ordinary member indicator areFocusTraversalKeysSet Reveal DetailHide Detail
        Returns whether the Set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Component.
        Ordinary member indicator getFocusCycleRootAncestor Reveal DetailHide Detail
        Returns the Container which is the focus cycle root of this Component's focus traversal cycle.
        Ordinary member indicator getFocusTraversalKeys Reveal DetailHide Detail
        Returns the Set of focus traversal keys for a given traversal operation for this Component.
        Ordinary member indicator getFocusTraversalKeysEnabled Reveal DetailHide Detail
        Returns whether focus traversal keys are enabled for this Component.
        Ordinary member indicator gotFocus Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
        Ordinary member indicator hasFocus Reveal DetailHide Detail
        Returns true if this Component is the focus owner.
        Ordinary member indicator isFocusable Reveal DetailHide Detail
        Returns whether this Component can be focused.
        Ordinary member indicator isFocusCycleRoot Reveal DetailHide Detail
        Returns whether the specified Container is the focus cycle root of this Component's focus traversal cycle.
        Ordinary member indicator isFocusOwner Reveal DetailHide Detail
        Returns true if this Component is the focus owner.
        Ordinary member indicator isFocusTraversable Reveal DetailHide Detail
        Deprecated. As of 1.4, replaced by isFocusable().
        Ordinary member indicator lostFocus Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
        Ordinary member indicator nextFocus Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by transferFocus().
        Ordinary member indicator requestFocus Reveal DetailHide Detail
        Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window.
        Ordinary member indicator requestFocusInWindow Reveal DetailHide Detail
        Requests that this Component get the input focus, if this Component's top-level ancestor is already the focused Window.
        Ordinary member indicator setFocusable Reveal DetailHide Detail
        Sets the focusable state of this Component to the specified value.
        Ordinary member indicator setFocusTraversalKeys Reveal DetailHide Detail
        Sets the focus traversal keys for a given traversal operation for this Component.
        Ordinary member indicator setFocusTraversalKeysEnabled Reveal DetailHide Detail
        Sets whether focus traversal keys are enabled for this Component.
        Ordinary member indicator transferFocus Reveal DetailHide Detail
        Transfers the focus to the next component, as though this Component were the focus owner.
        Ordinary member indicator transferFocusBackward Reveal DetailHide Detail
        Transfers the focus to the previous component, as though this Component were the focus owner.
        Ordinary member indicator transferFocusUpCycle Reveal DetailHide Detail
        Transfers the focus up one focus traversal cycle.
      • Graphics Methods 
        Modifier and Type Method and Description
        Ordinary member indicator getFontMetrics Reveal DetailHide Detail
        Gets the font metrics for the specified font.
        Ordinary member indicator getGraphics Reveal DetailHide Detail
        Creates a graphics context for this component.
        Ordinary member indicator getGraphicsConfiguration Reveal DetailHide Detail
        Gets the GraphicsConfiguration associated with this Component.
        Ordinary member indicator getLocationOnScreen Reveal DetailHide Detail
        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.
        Ordinary member indicator getMousePosition Reveal DetailHide Detail
        Returns the position of the mouse pointer in this Component's coordinate space if the Component is directly under the mouse pointer, otherwise returns null.
        Ordinary member indicator getToolkit Reveal DetailHide Detail
        Gets the toolkit of this component.
      • Image Methods 
        Modifier and Type Method and Description
        Ordinary member indicator checkImage Reveal DetailHide Detail
        Returns the status of the construction of a screen representation of the specified image.
        Ordinary member indicator checkImage Reveal DetailHide Detail
        Returns the status of the construction of a screen representation of the specified image.
        Ordinary member indicator createImage Reveal DetailHide Detail
        Creates an image from the specified image producer.
        Ordinary member indicator createImage Reveal DetailHide Detail
        Creates an off-screen drawable image to be used for double buffering.
        Ordinary member indicator createVolatileImage Reveal DetailHide Detail
        Creates a volatile off-screen drawable image to be used for double buffering.
        Ordinary member indicator createVolatileImage Reveal DetailHide Detail
        Creates a volatile off-screen drawable image, with the given capabilities.
        Ordinary member indicator imageUpdate Reveal DetailHide Detail
        Repaints the component when the image has changed.
        Ordinary member indicator prepareImage Reveal DetailHide Detail
        Prepares an image for rendering on this component.
        Ordinary member indicator prepareImage Reveal DetailHide Detail
        Prepares an image for rendering on this component at the specified width and height.
      • Layout Methods 
        Modifier and Type Method and Description
        Ordinary member indicator bounds Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by getBounds().
        Ordinary member indicator contains Reveal DetailHide Detail
        Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
        Ordinary member indicator contains Reveal DetailHide Detail
        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.
        Ordinary member indicator doLayout Reveal DetailHide Detail
        Prompts the layout manager to lay out this component.
        Ordinary member indicator getAlignmentX Reveal DetailHide Detail
        Returns the alignment along the x axis.
        Ordinary member indicator getAlignmentY Reveal DetailHide Detail
        Returns the alignment along the y axis.
        Ordinary member indicator getBaseline Reveal DetailHide Detail
        Returns the baseline.
        Ordinary member indicator getBaselineResizeBehavior Reveal DetailHide Detail
        Returns an enum indicating how the baseline of the component changes as the size changes.
        Ordinary member indicator getBounds Reveal DetailHide Detail
        Gets the bounds of this component in the form of a Rectangle object.
        Ordinary member indicator getBounds Reveal DetailHide Detail
        Stores the bounds of this component into "return value" rv and return rv.
        Ordinary member indicator getComponentAt Reveal DetailHide Detail
        Determines if this component or one of its immediate subcomponents contains the (xy) location, and if so, returns the containing component.
        Ordinary member indicator getComponentAt Reveal DetailHide Detail
        Returns the component or subcomponent that contains the specified point.
        Ordinary member indicator getHeight Reveal DetailHide Detail
        Returns the current height of this component.
        Ordinary member indicator getLocation Reveal DetailHide Detail
        Gets the location of this component in the form of a point specifying the component's top-left corner.
        Ordinary member indicator getLocation Reveal DetailHide Detail
        Stores the x,y origin of this component into "return value" rv and return rv.
        Ordinary member indicator getMaximumSize Reveal DetailHide Detail
        Gets the maximum size of this component.
        Ordinary member indicator getMinimumSize Reveal DetailHide Detail
        Gets the mininimum size of this component.
        Ordinary member indicator getPreferredSize Reveal DetailHide Detail
        Gets the preferred size of this component.
        Ordinary member indicator getSize Reveal DetailHide Detail
        Returns the size of this component in the form of a Dimension object.
        Ordinary member indicator getSize Reveal DetailHide Detail
        Stores the width/height of this component into "return value" rv and return rv.
        Ordinary member indicator getWidth Reveal DetailHide Detail
        Returns the current width of this component.
        Ordinary member indicator getX Reveal DetailHide Detail
        Returns the current x coordinate of the components origin.
        Ordinary member indicator getY Reveal DetailHide Detail
        Returns the current y coordinate of the components origin.
        Ordinary member indicator inside Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by contains(int, int).
        Ordinary member indicator invalidate Reveal DetailHide Detail
        Invalidates this component and its ancestors.
        Ordinary member indicator isMaximumSizeSet Reveal DetailHide Detail
        Returns true if the maximum size has been set to a non-null value otherwise returns false.
        Ordinary member indicator isMinimumSizeSet Reveal DetailHide Detail
        Returns whether or not setMinimumSize has been invoked with a non-null value.
        Ordinary member indicator isPreferredSizeSet Reveal DetailHide Detail
        Returns true if the preferred size has been set to a non-null value otherwise returns false.
        Ordinary member indicator isValid Reveal DetailHide Detail
        Determines whether this component is valid.
        Ordinary member indicator layout Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by doLayout().
        Ordinary member indicator locate Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
        Ordinary member indicator location Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by getLocation().
        Ordinary member indicator minimumSize Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
        Ordinary member indicator move Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by setLocation(int, int).
        Ordinary member indicator preferredSize Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
        Ordinary member indicator reshape Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by setBounds(int, int, int, int).
        Ordinary member indicator resize Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by setSize(Dimension).
        Ordinary member indicator resize Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by setSize(int, int).
        Ordinary member indicator revalidate Reveal DetailHide Detail
        Revalidates the component hierarchy up to the nearest validate root.
        Ordinary member indicator setBounds Reveal DetailHide Detail
        Moves and resizes this component.
        Ordinary member indicator setBounds Reveal DetailHide Detail
        Moves and resizes this component to conform to the new bounding rectangle r.
        Ordinary member indicator setLocation Reveal DetailHide Detail
        Moves this component to a new location.
        Ordinary member indicator setLocation Reveal DetailHide Detail
        Moves this component to a new location.
        Ordinary member indicator setMaximumSize Reveal DetailHide Detail
        Sets the maximum size of this component to a constant value.
        Ordinary member indicator setMinimumSize Reveal DetailHide Detail
        Sets the minimum size of this component to a constant value.
        Ordinary member indicator setPreferredSize Reveal DetailHide Detail
        Sets the preferred size of this component to a constant value.
        Ordinary member indicator setSize Reveal DetailHide Detail
        Resizes this component so that it has width d.width and height d.height.
        Ordinary member indicator setSize Reveal DetailHide Detail
        Resizes this component so that it has width width and height height.
        Ordinary member indicator size Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, replaced by getSize().
        Ordinary member indicator validate Reveal DetailHide Detail
        Validates this component.
      • Painting Methods 
        Modifier and Type Method and Description
        Ordinary member indicator getIgnoreRepaint Reveal DetailHide Detail
         
        Ordinary member indicator paint Reveal DetailHide Detail
        Paints this component.
        Ordinary member indicator paintAll Reveal DetailHide Detail
        Paints this component and all of its subcomponents.
        Ordinary member indicator repaint Reveal DetailHide Detail
        Repaints this component.
        Ordinary member indicator repaint Reveal DetailHide Detail
        Repaints the specified rectangle of this component.
        Ordinary member indicator repaint Reveal DetailHide Detail
        Repaints the component.
        Ordinary member indicator repaint Reveal DetailHide Detail
        Repaints the specified rectangle of this component within tm milliseconds.
        Ordinary member indicator setIgnoreRepaint Reveal DetailHide Detail
        Sets whether or not paint messages received from the operating system should be ignored.
        Ordinary member indicator update Reveal DetailHide Detail
        Updates this component.
      • Printing Methods 
        Modifier and Type Method and Description
        Ordinary member indicator list Reveal DetailHide Detail
        Prints a listing of this component to the standard system output stream System.out.
        Ordinary member indicator list Reveal DetailHide Detail
        Prints a listing of this component to the specified output stream.
        Ordinary member indicator list Reveal DetailHide Detail
        Prints out a list, starting at the specified indentation, to the specified print stream.
        Ordinary member indicator list Reveal DetailHide Detail
        Prints a listing to the specified print writer.
        Ordinary member indicator list Reveal DetailHide Detail
        Prints out a list, starting at the specified indentation, to the specified print writer.
        Ordinary member indicator print Reveal DetailHide Detail
        Prints this component.
        Ordinary member indicator printAll Reveal DetailHide Detail
        Prints this component and all of its subcomponents.
      • Other Methods 
        Modifier and Type Method and Description
        Ordinary member indicator add Reveal DetailHide Detail
        Adds the specified popup menu to the component.
        Ordinary member indicator addNotify Reveal DetailHide Detail
        Makes this Component displayable by connecting it to a native screen resource.
        Ordinary member indicator getDropTarget Reveal DetailHide Detail
        Gets the DropTarget associated with this Component.
        Ordinary member indicator getInputContext Reveal DetailHide Detail
        Gets the input context used by this component for handling the communication with input methods when text is entered in this component.
        Ordinary member indicator getInputMethodRequests Reveal DetailHide Detail
        Gets the input method request handler which supports requests from input methods for this component.
        Ordinary member indicator getPeer Reveal DetailHide Detail
        Deprecated. As of JDK version 1.1, programs should not directly manipulate peers; replaced by boolean isDisplayable().
        Ordinary member indicator getTreeLock Reveal DetailHide Detail
        Gets this component's locking object (the object that owns the thread synchronization monitor) for AWT component-tree and layout operations.
        Ordinary member indicator remove Reveal DetailHide Detail
        Removes the specified popup menu from the component.
        Ordinary member indicator removeNotify Reveal DetailHide Detail
        Makes this Component undisplayable by destroying it native screen resource.
        Ordinary member indicator setDropTarget Reveal DetailHide Detail
        Associate a DropTarget with this component.
        Overridden member indicator toString Reveal DetailHide Detail
        Returns a string representation of this component and its values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
This document was created by Dulcet from the OpenJDK sources. Copyright © 1993, 2012 Oracle and/or its affiliates. All rights reserved.

SourceForge