API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. Component View Source
Author(s)
Arthur van Hoff
Sami Shaio
Since
Version
1.426, 07/27/06
Serial
Hierarchy
 Object
      Component
Implements
 ImageObserver
 MenuContainer
 Serializable
Subclasses
Description
publicabstract abstract class Component
  A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.
See also:   
Constructors
protected Component ()
  Constructs a new component.
Methods
Hide/Show inherited methods
@Deprecated
public boolean action (Event evt, Object what)
publicsynchronized void add (PopupMenu popup)
  Adds the specified popup menu to the component.
publicsynchronized void addComponentListener (ComponentListener l)
  Adds the specified component listener to receive component events from this component.
publicsynchronized void addFocusListener (FocusListener l)
  Adds the specified focus listener to receive focus events from this component when this component gains input focus.
public void addHierarchyBoundsListener (HierarchyBoundsListener l)
  Adds the specified hierarchy bounds listener to receive hierarchy bounds events from this component when the hierarchy to which this container belongs changes.
public void addHierarchyListener (HierarchyListener l)
  Adds the specified hierarchy listener to receive hierarchy changed events from this component when the hierarchy to which this container belongs changes.
publicsynchronized void addInputMethodListener (InputMethodListener l)
  Adds the specified input method listener to receive input method events from this component.
publicsynchronized void addKeyListener (KeyListener l)
  Adds the specified key listener to receive key events from this component.
publicsynchronized void addMouseListener (MouseListener l)
  Adds the specified mouse listener to receive mouse events from this component.
publicsynchronized void addMouseMotionListener (MouseMotionListener l)
  Adds the specified mouse motion listener to receive mouse motion events from this component.
publicsynchronized void addMouseWheelListener (MouseWheelListener l)
  Adds the specified mouse wheel listener to receive mouse wheel events from this component.
public void addNotify ()
  Makes this Component displayable by connecting it to a native screen resource.
publicsynchronized void addPropertyChangeListener (PropertyChangeListener listener)
  Adds a PropertyChangeListener to the listener list.
publicsynchronized void addPropertyChangeListener (String propertyName, PropertyChangeListener listener)
  Adds a PropertyChangeListener to the listener list for a specific property.
pack-private void adjustListeningChildrenOnParent (long mask, int num)
public void applyComponentOrientation (ComponentOrientation orientation)
  Sets the ComponentOrientation property of this component and all components contained within it.
public boolean areFocusTraversalKeysSet (int id)
  Returns whether the Set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Component.
pack-private boolean areInputMethodsEnabled ()
pack-private void autoProcessMouseWheel (MouseWheelEvent e)
pack-privatefinal void autoTransferFocus (boolean clearOnFailure)
@Deprecated
public Rectangle bounds ()
pack-privatefinal boolean canBeFocusOwner ()
  Checks that this component meets the prerequesites to be focus owner: - it is enabled, visible, focusable - it's parents are all enabled and showing - top-level window is focusable - if focus cycle root has DefaultFocusTraversalPolicy then it also checks that this policy accepts this component as focus owner
pack-private void checkGD (String stringID)
Checks that this component's GraphicsDevice idString matches the string argument.
public int checkImage (Image image, ImageObserver observer)
  Returns the status of the construction of a screen representation of the specified image.
public int checkImage (Image image, int width, int height, ImageObserver observer)
  Returns the status of the construction of a screen representation of the specified image.
pack-private boolean checkWindowClosingException ()
pack-private void clearCurrentFocusCycleRootOnHide ()
pack-private void clearMostRecentFocusOwnerOnHide ()
protected AWTEvent coalesceEvents (AWTEvent existingEvent, AWTEvent newEvent)
  Potentially coalesce an event being posted with an existing event.
pack-private String constructComponentName ()
  Constructs a name for this component.
public boolean contains (int x, int y)
  Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
public boolean contains (Point p)
  Checks whether this component "contains" the specified point, where the point's x and y coordinates are defined to be relative to the coordinate system of this component.
pack-private boolean containsFocus ()
pack-private int countHierarchyMembers ()
pack-private void createBufferStrategy (int numBuffers)
  Creates a new strategy for multi-buffering on this component.
pack-private void createBufferStrategy (int numBuffers, BufferCapabilities caps) throws AWTException
  Creates a new strategy for multi-buffering on this component with the required buffer capabilities.
pack-private int createHierarchyEvents (int id, Component changed, Container changedParent, long changeFlags, boolean enabledOnToolkit)
public Image createImage (ImageProducer producer)
  Creates an image from the specified image producer.
public Image createImage (int width, int height)
  Creates an off-screen drawable image to be used for double buffering.
public VolatileImage createVolatileImage (int width, int height)
  Creates a volatile off-screen drawable image to be used for double buffering.
public VolatileImage createVolatileImage (int width, int height, ImageCapabilities caps) throws AWTException
  Creates a volatile off-screen drawable image, with the given capabilities.
@Deprecated
public void deliverEvent (Event e)
@Deprecated
public void disable ()
protectedfinal void disableEvents (long eventsToDisable)
  Disables the events defined by the specified event mask parameter from being delivered to this component.
publicfinal void dispatchEvent (AWTEvent e)
  Dispatches an event to this component or one of its sub components.
pack-private void dispatchEventImpl (AWTEvent e)
pack-private boolean dispatchMouseWheelToAncestor (MouseWheelEvent e)
public void doLayout ()
  Prompts the layout manager to lay out this component.
@Deprecated
public void enable ()
@Deprecated
public void enable (boolean b)
protectedfinal void enableEvents (long eventsToEnable)
  Enables the events defined by the specified event mask parameter to be delivered to this component.
public void enableInputMethods (boolean enable)
  Enables or disables input method support for this component.
pack-private boolean eventEnabled (AWTEvent e)
pack-private boolean eventTypeEnabled (int type)
pack-private Component findUnderMouseInWindow (PointerInfo pi)
  Assuming that mouse location is stored in PointerInfo passed to this method, it finds a Component that is in the same Window as this Component and is located under the mouse pointer.
protected void firePropertyChange (String propertyName, boolean oldValue, boolean newValue)
  Support for reporting bound property changes for boolean properties.
public void firePropertyChange (String propertyName, byte oldValue, byte newValue)
  Reports a bound property change.
public void firePropertyChange (String propertyName, char oldValue, char newValue)
  Reports a bound property change.
public void firePropertyChange (String propertyName, double oldValue, double newValue)
  Reports a bound property change.
public void firePropertyChange (String propertyName, float oldValue, float newValue)
  Reports a bound property change.
protected void firePropertyChange (String propertyName, int oldValue, int newValue)
  Support for reporting bound property changes for integer properties.
public void firePropertyChange (String propertyName, long oldValue, long newValue)
  Reports a bound property change.
protected void firePropertyChange (String propertyName, Object oldValue, Object newValue)
  Support for reporting bound property changes for Object properties.
public void firePropertyChange (String propertyName, short oldValue, short newValue)
  Reports a bound property change.
public AccessibleContext getAccessibleContext ()
  Gets the AccessibleContext associated with this Component.
pack-private int getAccessibleIndexInParent ()
  Gets the index of this object in its accessible parent.
pack-private AccessibleStateSet getAccessibleStateSet ()
  Gets the current state set of this object.
public float getAlignmentX ()
  Returns the alignment along the x axis.
public float getAlignmentY ()
  Returns the alignment along the y axis.
pack-private Image getBackBuffer ()
 
public Color getBackground ()
  Gets the background color of this component.
public int getBaseline (int width, int height)
  Returns the baseline.
public BaselineResizeBehavior getBaselineResizeBehavior ()
  Returns an enum indicating how the baseline of the component changes as the size changes.
public Rectangle getBounds ()
  Gets the bounds of this component in the form of a Rectangle object.
public Rectangle getBounds (Rectangle rv)
  Stores the bounds of this component into "return value" rv and return rv.
pack-private int getBoundsOp ()
Should only be used in subclass getBounds to check that part of bounds is actualy changing
pack-private BufferStrategy getBufferStrategy ()
 
public ColorModel getColorModel ()
  Gets the instance of ColorModel used to display the component on the output device.
public Component getComponentAt (int x, int y)
  Determines if this component or one of its immediate subcomponents contains the (xy) location, and if so, returns the containing component.
public Component getComponentAt (Point p)
  Returns the component or subcomponent that contains the specified point.
publicsynchronized ComponentListener getComponentListeners ()
  Returns an array of all the component listeners registered on this component.
public ComponentOrientation getComponentOrientation ()
  Retrieves the language-sensitive orientation that is to be used to order the elements or text within this component.
pack-private Window getContainingWindow ()
  Returns the Window ancestor of the component.
pack-privatestatic Window getContainingWindow (Component comp)
  Returns the Window ancestor of the component comp.
public Cursor getCursor ()
  Gets the cursor set in the component.
publicsynchronized DropTarget getDropTarget ()
Gets the DropTarget associated with this Component.
public Container getFocusCycleRootAncestor ()
  Returns the Container which is the focus cycle root of this Component's focus traversal cycle.
publicsynchronized FocusListener getFocusListeners ()
  Returns an array of all the focus listeners registered on this component.
pack-privatefinal Set getFocusTraversalKeys_NoIDCheck (int id)
public Set<AWTKeyStroke> getFocusTraversalKeys (int id)
  Returns the Set of focus traversal keys for a given traversal operation for this Component.
public boolean getFocusTraversalKeysEnabled ()
  Returns whether focus traversal keys are enabled for this Component.
pack-privatefinal Font getFont_NoClientCode ()
public Font getFont () [Specified in MenuContainer]
  Gets the font of this component.
public FontMetrics getFontMetrics (Font font)
  Gets the font metrics for the specified font.
public Color getForeground ()
  Gets the foreground color of this component.
pack-privatefinal Graphics getGraphics_NoClientCode ()
public Graphics getGraphics ()
  Creates a graphics context for this component.
pack-privatefinal GraphicsConfiguration getGraphicsConfiguration_NoClientCode ()
public GraphicsConfiguration getGraphicsConfiguration ()
  Gets the GraphicsConfiguration associated with this Component.
public int getHeight ()
  Returns the current height of this component.
publicsynchronized HierarchyBoundsListener getHierarchyBoundsListeners ()
  Returns an array of all the hierarchy bounds listeners registered on this component.
publicsynchronized HierarchyListener getHierarchyListeners ()
  Returns an array of all the hierarchy listeners registered on this component.
public boolean getIgnoreRepaint ()
 
public InputContext getInputContext ()
  Gets the input context used by this component for handling the communication with input methods when text is entered in this component.
publicsynchronized InputMethodListener getInputMethodListeners ()
  Returns an array of all the input method listeners registered on this component.
public InputMethodRequests getInputMethodRequests ()
  Gets the input method request handler which supports requests from input methods for this component.
publicsynchronized KeyListener getKeyListeners ()
  Returns an array of all the key listeners registered on this component.
public T getListeners (Class< T> listenerType)
  Returns an array of all the objects currently registered as FooListeners upon this Component.
public Locale getLocale ()
  Gets the locale of this component.
public Point getLocation ()
  Gets the location of this component in the form of a point specifying the component's top-left corner.
public Point getLocation (Point rv)
  Stores the x,y origin of this component into "return value" rv and return rv.
pack-privatefinal Point getLocationOnScreen_NoTreeLock ()
public Point getLocationOnScreen ()
  Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.
public Dimension getMaximumSize ()
  Gets the maximum size of this component.
public Dimension getMinimumSize ()
  Gets the mininimum size of this component.
publicsynchronized MouseListener getMouseListeners ()
  Returns an array of all the mouse listeners registered on this component.
publicsynchronized MouseMotionListener getMouseMotionListeners ()
  Returns an array of all the mouse motion listeners registered on this component.
public Point getMousePosition () throws HeadlessException
  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.
publicsynchronized MouseWheelListener getMouseWheelListeners ()
  Returns an array of all the mouse wheel listeners registered on this component.
public String getName ()
  Gets the name of the component.
pack-private Container getNativeContainer ()
pack-privatefinal Container getParent_NoClientCode ()
public Container getParent ()
  Gets the parent of this component.
@Deprecated
public ComponentPeer getPeer ()
public Dimension getPreferredSize ()
  Gets the preferred size of this component.
publicsynchronized PropertyChangeListener getPropertyChangeListeners ()
  Returns an array of all the property change listeners registered on this component.
publicsynchronized PropertyChangeListener getPropertyChangeListeners (String propertyName)
  Returns an array of all the listeners which have been associated with the named property.
public Dimension getSize ()
  Returns the size of this component in the form of a Dimension object.
public Dimension getSize (Dimension rv)
  Stores the width/height of this component into "return value" rv and return rv.
public Toolkit getToolkit ()
  Gets the toolkit of this component.
pack-privatefinal Toolkit getToolkitImpl ()
publicfinal Object getTreeLock ()
  Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
public int getWidth ()
  Returns the current width of this component.
public int getX ()
  Returns the current x coordinate of the components origin.
public int getY ()
  Returns the current y coordinate of the components origin.
@Deprecated
public boolean gotFocus (Event evt, Object what)
@Deprecated
public boolean handleEvent (Event evt)
public boolean hasFocus ()
  Returns true if this Component is the focus owner.
@Deprecated
public void hide ()
public boolean imageUpdate (Image img, int infoflags, int x, int y, int w, int h) [Specified in ImageObserver]
  Repaints the component when the image has changed.
pack-private void initializeFocusTraversalKeys ()
@Deprecated
public boolean inside (int x, int y)
public void invalidate ()
  Invalidates this component.
public boolean isBackgroundSet ()
  Returns whether the background color has been explicitly set for this Component.
pack-privatefinal boolean isCoalescingEnabled ()
Indicates whether coalesceEvents may do something.
public boolean isCursorSet ()
  Returns whether the cursor has been explicitly set for this Component.
public boolean isDisplayable ()
  Determines whether this component is displayable.
public boolean isDoubleBuffered ()
  Returns true if this component is painted to an offscreen image ("buffer") that's copied to the screen later.
public boolean isEnabled ()
  Determines whether this component is enabled.
pack-privatefinal boolean isEnabledImpl ()
public boolean isFocusable ()
  Returns whether this Component can be focused.
public boolean isFocusCycleRoot (Container container)
  Returns whether the specified Container is the focus cycle root of this Component's focus traversal cycle.
public boolean isFocusOwner ()
  Returns true if this Component is the focus owner.
@Deprecated
public boolean isFocusTraversable ()
  Returns whether this Component can become the focus owner.
pack-privatefinal boolean isFocusTraversableOverridden ()
public boolean isFontSet ()
  Returns whether the font has been explicitly set for this Component.
public boolean isForegroundSet ()
  Returns whether the foreground color has been explicitly set for this Component.
pack-privatestatic boolean isInstanceOf (Object obj, String className)
  Checks that the given object is instance of the given class.
public boolean isLightweight ()
  A lightweight component doesn't have a native toolkit peer.
public boolean isMaximumSizeSet ()
  Returns true if the maximum size has been set to a non-null value otherwise returns false.
public boolean isMinimumSizeSet ()
  Returns whether or not setMinimumSize has been invoked with a non-null value.
public boolean isOpaque ()
  Returns true if this component is completely opaque, returns false by default.
public boolean isPreferredSizeSet ()
  Returns true if the preferred size has been set to a non-null value otherwise returns false.
pack-private boolean isRecursivelyVisible ()
  Determines whether this component will be displayed on the screen.
pack-private boolean isSameOrAncestorOf (Component comp, boolean allowChildren)
  Overridden in Container.
public boolean isShowing ()
  Determines whether this component is showing on screen.
public boolean isValid ()
  Determines whether this component is valid.
public boolean isVisible ()
  Determines whether this component should be visible when its parent is visible.
@Deprecated
public boolean keyDown (Event evt, int key)
@Deprecated
public boolean keyUp (Event evt, int key)
@Deprecated
public void layout ()
pack-private void lightweightPaint (Graphics g)
  Simulates the peer callbacks into java.awt for painting of lightweight Components.
pack-private void lightweightPrint (Graphics g)
  Simulates the peer callbacks into java.awt for printing of lightweight Components.
public void list ()
  Prints a listing of this component to the standard system output stream System.out.
public void list (PrintStream out)
  Prints a listing of this component to the specified output stream.
public void list (PrintStream out, int indent)
  Prints out a list, starting at the specified indentation, to the specified print stream.
public void list (PrintWriter out)
  Prints a listing to the specified print writer.
public void list (PrintWriter out, int indent)
  Prints out a list, starting at the specified indentation, to the specified print writer.
@Deprecated
public Component locate (int x, int y)
@Deprecated
public Point location ()
@Deprecated
public boolean lostFocus (Event evt, Object what)
@Deprecated
public Dimension minimumSize ()
@Deprecated
public boolean mouseDown (Event evt, int x, int y)
@Deprecated
public boolean mouseDrag (Event evt, int x, int y)
@Deprecated
public boolean mouseEnter (Event evt, int x, int y)
@Deprecated
public boolean mouseExit (Event evt, int x, int y)
@Deprecated
public boolean mouseMove (Event evt, int x, int y)
@Deprecated
public boolean mouseUp (Event evt, int x, int y)
@Deprecated
public void move (int x, int y)
@Deprecated
public void nextFocus ()
pack-private boolean nextFocusHelper ()
pack-private int numListening (long mask)
public void paint (Graphics g)
  Paints this component.
public void paintAll (Graphics g)
  Paints this component and all of its subcomponents.
pack-private void paintHeavyweightComponents (Graphics g)
Paints all the heavyweight subcomponents.
protected String paramString ()
  Returns a string representing the state of this component.
pack-private Point pointRelativeToComponent (Point absolute)
Translates absolute coordinates into coordinates in the coordinate space of this component.
@Deprecated
public boolean postEvent (Event e) [Specified in MenuContainer]
pack-privatestatic boolean postNextFocusHelper (Component toFocus)
pack-private boolean postsOldMouseEvents ()
@Deprecated
public Dimension preferredSize ()
pack-private Component preNextFocusHelper ()
public boolean prepareImage (Image image, ImageObserver observer)
  Prepares an image for rendering on this component.
public boolean prepareImage (Image image, int width, int height, ImageObserver observer)
  Prepares an image for rendering on this component at the specified width and height.
public void print (Graphics g)
  Prints this component.
public void printAll (Graphics g)
  Prints this component and all of its subcomponents.
pack-private void printHeavyweightComponents (Graphics g)
Prints all the heavyweight subcomponents.
protected void processComponentEvent (ComponentEvent e)
  Processes component events occurring on this component by dispatching them to any registered ComponentListener objects.
protected void processEvent (AWTEvent e)
  Processes events occurring on this component.
protected void processFocusEvent (FocusEvent e)
  Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
protected void processHierarchyBoundsEvent (HierarchyEvent e)
  Processes hierarchy bounds events occurring on this component by dispatching them to any registered HierarchyBoundsListener objects.
protected void processHierarchyEvent (HierarchyEvent e)
  Processes hierarchy events occurring on this component by dispatching them to any registered HierarchyListener objects.
protected void processInputMethodEvent (InputMethodEvent e)
  Processes input method events occurring on this component by dispatching them to any registered InputMethodListener objects.
protected void processKeyEvent (KeyEvent e)
  Processes key events occurring on this component by dispatching them to any registered KeyListener objects.
protected void processMouseEvent (MouseEvent e)
  Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
protected void processMouseMotionEvent (MouseEvent e)
  Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.
protected void processMouseWheelEvent (MouseWheelEvent e)
  Processes mouse wheel events occurring on this component by dispatching them to any registered MouseWheelListener objects.
publicsynchronized void remove (MenuComponent popup) [Specified in MenuContainer]
  Removes the specified popup menu from the component.
publicsynchronized void removeComponentListener (ComponentListener l)
  Removes the specified component listener so that it no longer receives component events from this component.
publicsynchronized void removeFocusListener (FocusListener l)
  Removes the specified focus listener so that it no longer receives focus events from this component.
public void removeHierarchyBoundsListener (HierarchyBoundsListener l)
  Removes the specified hierarchy bounds listener so that it no longer receives hierarchy bounds events from this component.
public void removeHierarchyListener (HierarchyListener l)
  Removes the specified hierarchy listener so that it no longer receives hierarchy changed events from this component.
publicsynchronized void removeInputMethodListener (InputMethodListener l)
  Removes the specified input method listener so that it no longer receives input method events from this component.
publicsynchronized void removeKeyListener (KeyListener l)
  Removes the specified key listener so that it no longer receives key events from this component.
publicsynchronized void removeMouseListener (MouseListener l)
  Removes the specified mouse listener so that it no longer receives mouse events from this component.
publicsynchronized void removeMouseMotionListener (MouseMotionListener l)
  Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component.
publicsynchronized void removeMouseWheelListener (MouseWheelListener l)
  Removes the specified mouse wheel listener so that it no longer receives mouse wheel events from this component.
public void removeNotify ()
  Makes this Component undisplayable by destroying it native screen resource.
publicsynchronized void removePropertyChangeListener (PropertyChangeListener listener)
  Removes a PropertyChangeListener from the listener list.
publicsynchronized void removePropertyChangeListener (String propertyName, PropertyChangeListener listener)
  Removes a PropertyChangeListener from the listener list for a specific property.
public void repaint ()
  Repaints this component.
public void repaint (int x, int y, int width, int height)
  Repaints the specified rectangle of this component.
public void repaint (long tm)
  Repaints the component.
public void repaint (long tm, int x, int y, int width, int height)
  Repaints the specified rectangle of this component within tm milliseconds.
public void requestFocus ()
  Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window.
protected boolean requestFocus (boolean temporary)
  Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window.
pack-private boolean requestFocus (boolean temporary, sun.awt.CausedFocusEvent.Cause cause)
pack-private void requestFocus (sun.awt.CausedFocusEvent.Cause cause)
pack-privatefinal boolean requestFocusHelper (boolean temporary, boolean focusedWindowChangeAllowed)
pack-privatefinal boolean requestFocusHelper (boolean temporary, boolean focusedWindowChangeAllowed, sun.awt.CausedFocusEvent.Cause cause)
public boolean requestFocusInWindow ()
  Requests that this Component get the input focus, if this Component's top-level ancestor is already the focused Window.
protected boolean requestFocusInWindow (boolean temporary)
  Requests that this Component get the input focus, if this Component's top-level ancestor is already the focused Window.
pack-private boolean requestFocusInWindow (boolean temporary, sun.awt.CausedFocusEvent.Cause cause)
pack-private boolean requestFocusInWindow (sun.awt.CausedFocusEvent.Cause cause)
pack-private void resetGC ()
  Resets this Component's GraphicsConfiguration back to a default value.
@Deprecated
public void reshape (int x, int y, int width, int height)
@Deprecated
public void resize (Dimension d)
@Deprecated
public void resize (int width, int height)
public void setBackground (Color c)
  Sets the background color of this component.
public void setBounds (int x, int y, int width, int height)
  Moves and resizes this component.
public void setBounds (Rectangle r)
  Moves and resizes this component to conform to the new bounding rectangle r.
pack-private void setBoundsOp (int op)
public void setComponentOrientation (ComponentOrientation o)
  Sets the language-sensitive orientation that is to be used to order the elements or text within this component.
public void setCursor (Cursor cursor)
  Sets the cursor image to the specified cursor.
publicsynchronized void setDropTarget (DropTarget dt)
  Associate a DropTarget with this component.
public void setEnabled (boolean b)
  Enables or disables this component, depending on the value of the parameter b.
public void setFocusable (boolean focusable)
  Sets the focusable state of this Component to the specified value.
pack-privatefinal void setFocusTraversalKeys_NoIDCheck (int id, Set<AWTKeyStroke> keystrokes)
public void setFocusTraversalKeys (int id, Set<AWTKeyStroke> keystrokes)
  Sets the focus traversal keys for a given traversal operation for this Component.
public void setFocusTraversalKeysEnabled (boolean focusTraversalKeysEnabled)
  Sets whether focus traversal keys are enabled for this Component.
public void setFont (Font f)
  Sets the font of this component.
public void setForeground (Color c)
  Sets the foreground color of this component.
pack-private void setGCFromPeer ()
public void setIgnoreRepaint (boolean ignoreRepaint)
  Sets whether or not paint messages received from the operating system should be ignored.
public void setLocale (Locale l)
  Sets the locale of this component.
public void setLocation (int x, int y)
  Moves this component to a new location.
public void setLocation (Point p)
  Moves this component to a new location.
public void setMaximumSize (Dimension maximumSize)
  Sets the maximum size of this component to a constant value.
public void setMinimumSize (Dimension minimumSize)
  Sets the minimum size of this component to a constant value.
public void setName (String name)
  Sets the name of the component to the specified string.
public void setPreferredSize (Dimension preferredSize)
  Sets the preferred size of this component to a constant value.
pack-privatestaticsynchronized void setRequestFocusController (sun.awt.RequestFocusController requestController)
public void setSize (Dimension d)
  Resizes this component so that it has width d.width and height d.height.
public void setSize (int width, int height)
  Resizes this component so that it has width width and height height.
public void setVisible (boolean b)
  Shows or hides this component depending on the value of parameter b.
@Deprecated
public void show ()
@Deprecated
public void show (boolean b)
@Deprecated
public Dimension size ()
public String toString ()
  Returns a string representation of this component and its values.
public void transferFocus ()
  Transfers the focus to the next component, as though this Component were the focus owner.
public void transferFocusBackward ()
  Transfers the focus to the previous component, as though this Component were the focus owner.
public void transferFocusUpCycle ()
  Transfers the focus up one focus traversal cycle.
public void update (Graphics g)
  Updates this component.
pack-privatefinal void updateCursorImmediately ()
  Updates the cursor.
public void validate ()
  Ensures that this component has a valid layout.
Fields
Hide/Show inherited fields
publicfinalstatic int ABORT = "128" [Inherited From ImageObserver]
  This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously was aborted before production was complete.
pack-private AccessibleContext accessibleContext
pack-privatefinalstatic String actionListenerK = "actionL"
Internal, constants for serialization
pack-privatefinalstatic String adjustmentListenerK = "adjustmentL"
publicfinalstatic int ALLBITS = "32" [Inherited From ImageObserver]
  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.
pack-privatetransient sun.awt.AppContext appContext
  The AppContext of the component.
pack-private Color background
  The background color for this component.
publicfinalstatic float BOTTOM_ALIGNMENT = "1.0"
  Ease-of-use constant for getAlignmentY.
pack-privatetransient BufferStrategy bufferStrategy
  A reference to a BufferStrategy object used to manipulate the buffers on this component.
publicfinalstatic float CENTER_ALIGNMENT = "0.5"
  Ease-of-use constant for getAlignmentY and getAlignmentX.
pack-privatetransient ComponentListener componentListener
pack-privatefinalstatic String componentListenerK = "componentL"
pack-privatetransient ComponentOrientation componentOrientation
  The orientation for this component.
pack-privatefinalstatic String containerListenerK = "containerL"
pack-private Cursor cursor
  The cursor displayed when pointer is over this component.
pack-private DropTarget dropTarget
  The DropTarget associated with this component.
pack-private boolean enabled
  True when the object is enabled.
publicfinalstatic int ERROR = "64" [Inherited From ImageObserver]
  This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously has encountered an error.
pack-privatetransient EventQueueItem eventCache
pack-private long eventMask
  The eventMask is ONLY set by subclasses via enableEvents.
pack-privatetransient FocusListener focusListener
pack-privatefinalstatic String focusListenerK = "focusL"
pack-private Set focusTraversalKeys
  The focus traversal keys.
pack-private Font font
  The font used by this component.
pack-private Color foreground
  The foreground color for this component.
publicfinalstatic int FRAMEBITS = "16" [Inherited From ImageObserver]
  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.
pack-privatetransient GraphicsConfiguration graphicsConfig
  A reference to a GraphicsConfiguration object used to describe the characteristics of a graphics destination.
pack-private int height
  The height of the component.
publicfinalstatic int HEIGHT = "2" [Inherited From ImageObserver]
  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.
pack-privatetransient HierarchyBoundsListener hierarchyBoundsListener
pack-privatefinalstatic String hierarchyBoundsListenerK = "hierarchyBoundsL"
pack-privatetransient HierarchyListener hierarchyListener
pack-privatefinalstatic String hierarchyListenerK = "hierarchyL"
pack-private boolean ignoreRepaint
  True when the object should ignore all repaint events.
pack-privatestatic int incRate
pack-privatetransient InputMethodListener inputMethodListener
pack-privatefinalstatic String inputMethodListenerK = "inputMethodL"
pack-privatestatic boolean isInc
  Static properties for incremental drawing.
pack-private boolean isPacked
pack-privatefinalstatic String itemListenerK = "itemL"
pack-privatetransient KeyListener keyListener
pack-privatefinalstatic String keyListenerK = "keyL"
publicfinalstatic float LEFT_ALIGNMENT = "0.0"
  Ease-of-use constant for getAlignmentX.
pack-private Locale locale
  The locale for the component.
pack-privatefinalstatic Object LOCK
  The locking object for AWT component-tree and layout operations.
pack-private Dimension maxSize
Maximum size
pack-private boolean maxSizeSet
Whether or not setMaximumSize has been invoked with a non-null value.
pack-private Dimension minSize
  Minimum size.
pack-private boolean minSizeSet
Whether or not setMinimumSize has been invoked with a non-null value.
pack-privatetransient MouseListener mouseListener
pack-privatefinalstatic String mouseListenerK = "mouseL"
pack-privatetransient MouseMotionListener mouseMotionListener
pack-privatefinalstatic String mouseMotionListenerK = "mouseMotionL"
pack-privatetransient MouseWheelListener mouseWheelListener
pack-privatefinalstatic String mouseWheelListenerK = "mouseWheelL"
pack-privatetransient NativeInLightFixer nativeInLightFixer
pack-private boolean newEventsOnly
  newEventsOnly will be true if the event is one of the event types enabled for the component.
pack-privatefinalstatic String ownedWindowK = "ownedL"
pack-privatetransient Container parent
  The parent of the object.
pack-privatetransient ComponentPeer peer
  The peer of the component.
pack-private Font peerFont
  The font which the peer is currently using.
pack-private Vector popups
 
pack-private Dimension prefSize
  Preferred size.
pack-private boolean prefSizeSet
Whether or not setPreferredSize has been invoked with a non-null value.
publicfinalstatic int PROPERTIES = "4" [Inherited From ImageObserver]
  This flag in the infoflags argument to imageUpdate indicates that the properties of the image are now available.
publicfinalstatic float RIGHT_ALIGNMENT = "1.0"
  Ease-of-use constant for getAlignmentX.
publicfinalstatic int SOMEBITS = "8" [Inherited From ImageObserver]
  This flag in the infoflags argument to imageUpdate indicates that more pixels needed for drawing a scaled variation of the image are available.
pack-privatefinalstatic String textListenerK = "textL"
publicfinalstatic float TOP_ALIGNMENT = "0.0"
  Ease-of-use constant for getAlignmentY().
pack-private boolean valid
  True when the object is valid.
pack-private boolean visible
  True when the object is visible.
pack-private int width
  The width of the component.
publicfinalstatic int WIDTH = "1" [Inherited From ImageObserver]
  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.
pack-privatetransient RuntimeException windowClosingException
pack-privatefinalstatic String windowFocusListenerK = "windowFocusL"
pack-privatefinalstatic String windowListenerK = "windowL"
pack-privatefinalstatic String windowStateListenerK = "windowStateL"
pack-private int x
  The x position of the component in the parent's coordinate system.
pack-private int y
  The y position of the component in the parent's coordinate system.
Nested Classes
  Component.AWTTreeLock
  Component.BaselineResizeBehavior
Enumeration of the common ways the baseline of a component can change as the size changes.
  Component.FlipBufferStrategy
Inner class for flipping buffers on a component.
  Component.BltBufferStrategy
Inner class for blitting offscreen surfaces to a component.
  Component.NativeInLightFixer
This odd class is to help out a native component that has been embedded in a lightweight component.
  Component.AccessibleAWTComponent
Inner class of Component used to provide default support for accessibility.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar