JComponent,
you must place the component in a containment hierarchy
whose root is a top-level Swing container.
Top-level Swing containers --
such as JFrame and JDialog --
are specialized components
that provide a place for other Swing components to paint themselves.
For an explanation of containment hierarchies, see
Swing Components and the Containment Hierarchy,
a section in The Java Tutorial.
The JComponent class provides:
javax.swing.plaf.ComponentUI .
See How
to Set the Look and Feel
in The Java Tutorial
for more information.
JComponent contains all of the methods in the
Accessible interface,
but it doesn't actually implement the interface. That is the
responsibility of the individual classes
that extend JComponent.
putClientProperty
and getClientProperty methods,
you can associate name-object pairs
with any object that descends from JComponent.
Swing package description
and The Java Tutorial section
The JComponent Class.
JComponent and its subclasses document default values
for certain properties. For example, JTable documents the
default row height as 16. Each JComponent subclass
that has a ComponentUI will create the
ComponentUI as part of its constructor. In order
to provide a particular look and feel each
ComponentUI may set properties back on the
JComponent that created it. For example, a custom
look and feel may require JTables to have a row
height of 24. The documented defaults are the value of a property
BEFORE the ComponentUI has been installed. If you
need a specific value for a particular property you should
explicitly set it.
A JComponent may contain any number of default or initial
components as children. This behaviour may change according to look and
feel, therefore a JComponent may contain some default or
initial components as children for a particular Look and Feel, whereas it
may not do so for some other Look and Feel. Within a particular Look and
Feel also, this behaviour may change depending upon the configuration
properties of the JComponent. In summary, it is not valid
to assume a JComponent has no children just because the application
did not directly add them.
In release 1.4, the focus subsystem was rearchitected. For more information, see How to Use the Focus Subsystem, a section in The Java Tutorial.
Warning
Swing is not thread safe. For more information see Swing's Threading Policy.
Warning
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans
has been added to the java.beans package.
Please see java..
KeyStroke, Action, setBorder, registerKeyboardAction, JOptionPane, setDebugGraphicsOptions, setToolTipText, setAutoscrolls
| Modifier and Type | Class and Description |
|---|---|
| public abstract class | JComponent.
Inner class of JComponent used to provide default support for accessibility. |
| pack-priv static class | JComponent.
|
| pack-priv static class | |
| pack-priv static class | |
| private static class | JComponent.
This object is the |
| Modifier and Type | Field and Description |
|---|---|
| private transient Object | aaHint
AA text hints. |
| private ActionMap | actionMap
ActionMap. |
| private static final int | |
| private float | |
| private float | |
| private static final int | |
| private static final int | |
| private InputMap | ancestorInputMap
Used for |
| private boolean | autoscrolls
Whether or not autoscroll has been enabled. |
| private static final int | |
| private Border | |
| private transient ArrayTable | |
| private static final int | |
| private static Component | |
| private static Object | |
| private static final int | |
| pack-priv static boolean | DEBUG_GRAPHICS_LOADED
Set to true when DebugGraphics has been loaded. |
| private static volatile Locale | |
| private int | |
| private static final int | |
| private static final int | |
| private static final int | |
| pack-priv static final RequestFocusController | |
| private InputMap | focusInputMap
Used for |
| private static final int | |
| private InputVerifier | |
| private static final JComponent. | |
| private static final int | IS_DOUBLE_BUFFERED
Private flags |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private boolean | |
| private boolean | |
| pack-priv static JComponent | |
| private static final int | |
| private static final String | KEYBOARD_BINDINGS_KEY
The key used by |
| private transient Object | |
| protected EventListenerList | listenerList
A list of event listeners for this component. |
| private static Set | managingFocusBackwardTraversalKeys
Keys to use for backward focus traversal when the JComponent is managing focus. |
| private static Set | managingFocusForwardTraversalKeys
Keys to use for forward focus traversal when the JComponent is managing focus. |
| private static final String | |
| private static final int | |
| private static final int | |
| pack-priv transient Component | paintingChild
Set in |
| private static final int | |
| private JPopupMenu | popupMenu
|
| private static final Hashtable | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private transient AtomicBoolean | |
| private static List | tempRectangles
Temporary rectangles. |
| public static final String | TOOL_TIP_TEXT_KEY
The comment to display when the cursor is over the component, also known as a "value tip", "flyover help", or "flyover label". |
| protected transient ComponentUI | ui
The look and feel delegate for this component. |
| private static final String | |
| public static final int | UNDEFINED_CONDITION
Constant used by some of the APIs to mean that no condition is defined. |
| private boolean | |
| private VetoableChangeSupport | |
| public static final int | WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
Constant used for |
| public static final int | WHEN_FOCUSED
Constant used for |
| public static final int | WHEN_IN_FOCUSED_WINDOW
Constant used for |
| private static final String | WHEN_IN_FOCUSED_WINDOW_BINDINGS
An array of |
| private static final int | |
| private ComponentInputMap | windowInputMap
Used for |
| private static final int | WRITE_OBJ_COUNTER_FIRST
Bits 14-21 are used to handle nested writeObject calls. |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public void | addAncestorListener(AncestorListener
the listener)AncestorListener to registerRegisters |
| public void | addNotify()
Overrides java. Notifies this component that it now has a parent component. |
| public synchronized void | addVetoableChangeListener(VetoableChangeListener
the listener)VetoableChangeListener to be addedAdds a |
| private void | |
| pack-priv boolean | Returns: always returns falseReturns whether this component should be guaranteed to be on top. |
| pack-priv boolean | Returns: always returns trueReturns true, which implies that before checking if a child should be painted it is first check that the child is not obscured by another sibling. |
| pack-priv void | |
| pack-priv void | componentInputMapChanged(ComponentInputMap
the map containing the new bindings inputMap)Invoked from |
| pack-priv static final void | computeVisibleRect(Component
the component c, Rectangle a visibleRect)Rectangle computed as the
intersection of all visible rectangles for the component
c and all of its ancestors -- this is the
return value for this methodReturns the |
| public void | computeVisibleRect(Rectangle
a visibleRect)Rectangle computed as the
intersection of all visible rectangles for this
component and all of its ancestors -- this is the return
value for this methodReturns the |
| pack-priv void | |
| public boolean | Returns: true if this component logically contains x,yOverrides java. Gives the UI delegate an opportunity to define the precise shape of this component for the sake of mouse processing. |
| public JToolTip | Returns: theJToolTip used to display this toolTipReturns the instance of |
| private void | |
| public void | disable()
Overrides java.
Deprecated
As of JDK version 1.1,
replaced by
java.awt.Component.setEnabled(boolean).
|
| pack-priv void | |
| pack-priv TransferHandler. | Returns: the drop location, ornullthe point to calculate a drop location for p)Calculates a custom drop location for this type of component, representing where a drop at the given point should insert data. |
| public void | enable()
Overrides java.
Deprecated
As of JDK version 1.1,
replaced by
java.awt.Component.setEnabled(boolean).
|
| private static Rectangle | |
| public void | firePropertyChange(String
the property whose value has changed propertyName, boolean the property's previous value oldValue, boolean the property's new value newValue)Overrides java. Support for reporting bound property changes for boolean properties. |
| public void | firePropertyChange(String
the property whose value has changed propertyName, int the property's previous value oldValue, int the property's new value newValue)Overrides java. Support for reporting bound property changes for integer properties. |
| public void | firePropertyChange(String propertyName, char oldValue, char newValue)
Overrides java. Reports a bound property change. |
| protected void | fireVetoableChange(String
the name of the property that was listened on propertyName, Object the old value of the property oldValue, Object the new value of the property newValue)Supports reporting constrained property changes. |
| public ActionListener | Returns: theActionListener
object invoked when the keystroke occursthe keystroke for which to return a listener aKeyStroke)Returns the object that will perform the action registered for a given keystroke. |
| public final ActionMap | Returns: theActionMap containing the key/action bindingsReturns the |
| pack-priv final ActionMap | Returns: theActionMap for this component; if the
create flag is false and there is no
current ActionMap, returns nullif true, create the create)ActionMap if it
is not already createdFinds and returns the appropriate |
| public float | Returns: the value of thealignmentX propertyOverrides java. Overrides |
| public float | Returns: the value of thealignmentY propertyOverrides java. Overrides |
| public AncestorListener[] | Returns: all of the component'sAncestorListeners
or an empty
array if no ancestor listeners are currently registeredReturns an array of all the ancestor listeners registered on this component. |
| private AncestorNotifier | |
| public boolean | |
| public int | |
| public Component. | getBaselineResizeBehavior()
Overrides java. Returns an enum indicating how the baseline of the component changes as the size changes. |
| public Border | Returns: the border object for this componentReturns the border of this component or |
| public Rectangle | Returns: rv; if rv is null
return a newly created Rectangle with this
component's boundsthe return value, modified to the component's bounds rv)Overrides java. Stores the bounds of this component into "return value"
|
| private ArrayTable | Returns: an ArrayTableReturns an |
| public final Object | Returns: the value of this property ornullthe being queried key)Returns the value of the property with the specified key. |
| protected Graphics | Returns: aGraphics object configured for this componentthe original g)Graphics objectReturns the graphics object used to paint this component. |
| public JPopupMenu | Returns: JPopupMenu assigned for this component
or null if no popup assignedReturns |
| public int | Returns: the action-keystroke conditionthe keystroke for which to request an
action-keystroke condition aKeyStroke)Returns the condition that determines whether a registered action occurs in response to the specified keystroke. |
| pack-priv boolean | Returns: true if this component had a double buffer image, false otherwiseReturns true if the |
| public int | Returns: a bitwise OR'd flag of zero or more of the following options:
Returns the state of graphics debugging. |
| public static Locale | Returns: the defaultLocale.Returns the default locale used to initialize each JComponent's locale property upon creation. |
| private boolean | |
| public FontMetrics | Returns: the font metrics forfontthe font for which font metrics is to be
obtained font)Overrides java. Gets the |
| public Graphics | Returns: this components graphics contextOverrides java. Returns this component's graphics context, which lets you draw on a component. |
| pack-priv static void | |
| public int | Returns: the current height of this componentOverrides java. Returns the current height of this component. |
| public boolean | Returns: true if the JPopupMenu should be inherited from the parentReturns true if the JPopupMenu should be inherited from the parent. |
| public final InputMap | Returns: theInputMap for the specified
conditionone of WHEN_IN_FOCUSED_WINDOW, WHEN_FOCUSED,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT condition)Returns the |
| public final InputMap | Returns: theInputMap used when the component has focusReturns the |
| pack-priv final InputMap | Returns: theInputMap for the given condition;
if create is false and the InputMap
hasn't been created, returns nullone of the following values:
condition, boolean
if true, create the create)InputMap if it
is not already createdReturns the |
| public InputVerifier | |
| public Insets | Returns: the value of the insets propertyOverrides java. If a border has been set on this component, returns the
border's insets; otherwise calls |
| public Insets | |
| public <T extends EventListener> T[] | Returns: an array of all objects registered asFooListeners on this component,
or an empty array if no such
listeners have been addedthe type of listeners requested; this parameter
should specify an interface that descends from
listenerType)java.util.EventListenerOverrides java. Returns an array of all the objects currently registered
as |
| public Point | Returns: rvthe return value, modified to the component's location rv)Overrides java. Stores the x,y origin of this component into "return value"
|
| pack-priv static Set | getManagingFocusBackwardTraversalKeys()
Returns the Set of |
| pack-priv static Set | getManagingFocusForwardTraversalKeys()
Returns the Set of |
| public Dimension | Returns: the value of themaximumSize propertyOverrides java. If the maximum size has been set to a non- |
| public Dimension | Returns: the value of theminimumSize propertyOverrides java. If the minimum size has been set to a non- |
| public Component | Returns: theComponent that will follow this
JComponent in the focus traversal cycle, or
null if none has been explicitly specified
Deprecated
As of 1.4, replaced by
FocusTraversalPolicy.
In release 1.4, the focus subsystem was rearchitected. |
| private int | Returns: NOT_OBSCURED if non of the siblings above the Component obscure it, COMPLETELY_OBSCURED if one of the siblings completely obscures the Component or PARTIALLY_OBSCURED if the Component is only partially obscured.Returns whether or not the region of the specified component is obscured by a sibling. |
| public Point | Returns: location to display theJPopupMenu, or nullthe event)MouseEvent that triggered the popup to be
shown, or null if the popup is not being shown as the
result of a mouse eventReturns the preferred location to display the popup menu in this component's coordinate system. |
| public Dimension | Returns: the value of thepreferredSize propertyOverrides java. If the |
| public KeyStroke[] | Returns: an array ofKeyStroke objectsReturns the |
| public JRootPane | Returns: theJRootPane that contains this component,
or null if no JRootPane is foundReturns the |
| public Dimension | Returns: rvthe return value, modified to the component's size rv)Overrides java. Stores the width/height of this component into "return value"
|
| public Point | Returns: always returnsnullthe event)MouseEvent that caused the
ToolTipManager to show the tooltipReturns the tooltip location in this component's coordinate system. |
| public String | Returns: the text of the tool tipReturns the tooltip string that has been set with
|
| public String | Returns: a string containing the tooltipthe event)MouseEvent that initiated the
ToolTip displayReturns the string to be used as the tooltip for event. |
| public Container | Returns: the top-levelContainer that this component is in,
or null if not in any containerReturns the top-level ancestor of this component (the
containing |
| public TransferHandler | Returns: the value of thetransferHandler propertyImplements javax. Gets the |
| public ComponentUI | Returns: theComponentUI object that renders this componentReturns the look and feel delegate that renders this component. |
| public String | Returns: theUIDefaults key for a
ComponentUI subclassReturns the |
| public boolean | Returns: value of theverifyInputWhenFocusTarget propertyReturns the value that indicates whether the input verifier for the current focus owner will be called before this component requests focus. |
| public synchronized VetoableChangeListener[] | Returns: all of the component'sVetoableChangeListeners
or an empty
array if no vetoable change listeners are currently registeredReturns an array of all the vetoable change listeners registered on this component. |
| public Rectangle | Returns: the visible rectangleReturns the |
| public int | Returns: the current width of this componentOverrides java. Returns the current width of this component. |
| pack-priv static byte | |
| public int | Returns: the current x coordinate of the component's originOverrides java. Returns the current x coordinate of the component's origin. |
| public int | Returns: the current y coordinate of the component's originOverrides java. Returns the current y coordinate of the component's origin. |
| public void | grabFocus()
Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window. |
| public void | |
| private static boolean | isComponentObtainingGraphicsFrom(Component c)
Returns true if |
| public boolean | Returns: true if this component is double buffered, otherwise falseOverrides java. Returns whether this component should use a buffer to paint. |
| public static boolean | Returns: true if this component is lightweightthe c)Component to be checkedReturns true if this component is lightweight, that is, if it doesn't have a native window system peer. |
| public boolean | Returns: false
Deprecated
As of 1.4, replaced by
Component.setFocusTraversalKeys(int, Set) and
Container.setFocusCycleRoot(boolean).
In release 1.4, the focus subsystem was rearchitected. |
| public boolean | Returns: true if this component is completely opaqueOverrides java. Returns true if this component is completely opaque. |
| public boolean | Returns: always returns trueReturns true if this component tiles its children -- that is, if it can guarantee that the children will not overlap. |
| pack-priv boolean | isPainting()
Returns true if this component, or any of its ancestors, are in the processing of painting. |
| public final boolean | Returns: true if the current painting operation on this component is part of a print operationReturns |
| protected boolean | Returns: always returnsfalseReturns |
| public boolean | Returns: true if the component is currently painting a tile, false otherwiseReturns true if the component is currently painting a tile. |
| public boolean | Returns: true if this component should get focus,
otherwise returns falseReturns |
| public boolean | Returns: always returns falseOverrides java. If this method returns true, |
| public void | paint(Graphics
the g)Graphics context in which to paintOverrides java. Invoked by Swing to draw components. |
| protected void | |
| protected void | |
| protected void | paintComponent(Graphics
the g)Graphics object to protectCalls the UI delegate's paint method, if the UI delegate
is non- |
| pack-priv void | |
| public void | paintImmediately(int
the x value of the region to be painted x, int the y value of the region to be painted y, int the width of the region to be painted w, int the height of the region to be painted h)Paints the specified region in this component and all of its descendants that overlap the region, immediately. |
| public void | paintImmediately(Rectangle
a r)Rectangle containing the region to be paintedPaints the specified region now. |
| pack-priv void | paintToOffscreen(Graphics g, int x, int y, int w, int h, int maxX, int maxY)
Paints to the specified graphics. |
| protected String | Returns: a string representation of thisJComponentOverrides java. Returns a string representation of this |
| public void | print(Graphics
the g)Graphics context in which to paintOverrides java. Invoke this method to print the component to the specified
|
| public void | printAll(Graphics
the g)Graphics context in which to paintOverrides java. Invoke this method to print the component. |
| protected void | |
| protected void | |
| protected void | printComponent(Graphics
the g)Graphics context in which to paintThis is invoked during a printing operation. |
| protected void | processComponentKeyEvent(KeyEvent
the event to be processed e)Processes any key events that the component itself recognizes. |
| protected boolean | Returns: true if there was a binding to an action, and the action was enabledthe ks, KeyEvent KeyStroke queriedthe e, int KeyEventone of the following values:
condition, boolean
true if the key is pressed pressed)Invoked to process the key bindings for |
| pack-priv boolean | Returns: true if there is a key binding forethe unconsumed e, boolean KeyEventtrue if the key is pressed pressed)This is invoked as the result of a |
| pack-priv static boolean | |
| protected void | processKeyEvent(KeyEvent e)
Overrides java. Overrides |
| protected void | processMouseEvent(MouseEvent
the mouse event e)Overrides java. Processes mouse events occurring on this component by
dispatching them to any registered
|
| protected void | processMouseMotionEvent(MouseEvent
the e)MouseEventOverrides java. Processes mouse motion events, such as MouseEvent.MOUSE_DRAGGED. |
| public final void | putClientProperty(Object
the new client property key key, Object the new client property value; if value)null
this method will remove the propertyAdds an arbitrary key/value "client property" to this component. |
| private void | readObject(ObjectInputStream
the s)ObjectInputStream from which to readHides java. We use the |
| pack-priv boolean | Returns: true if the specified rectangle is obscured by an opaque childx value of specified rectangle x, int y value of specified rectangle y, int width of specified rectangle width, int height of specified rectangle height)If the specified rectangle is completely obscured by any of this component's opaque children then returns true. |
| private static void | |
| public void | registerKeyboardAction(ActionListener
the anAction, String Action to be registeredthe command to be set in the delivered event aCommand, KeyStroke the aKeyStroke, int KeyStroke to bind to the actionthe condition that needs to be met, see above aCondition)This method is now obsolete, please use a combination of
|
| public void | registerKeyboardAction(ActionListener
action to be registered to given keystroke and condition anAction, KeyStroke a aKeyStroke, int KeyStrokethe condition to be associated with given keystroke
and action aCondition)This method is now obsolete, please use a combination of
|
| private void | |
| private void | |
| private void | registerWithKeyboardManager(boolean
if true, only actions that haven't been registered
are pushed to the onlyIfNew)KeyboardManagerRegisters any bound |
| private void | |
| public void | removeAncestorListener(AncestorListener
the listener)AncestorListener to be removedUnregisters |
| public void | removeNotify()
Overrides java. Notifies this component that it no longer has a parent component. |
| public synchronized void | removeVetoableChangeListener(VetoableChangeListener
the listener)VetoableChangeListener to be removedRemoves a |
| public void | repaint(long
this parameter is not used tm, int the x value of the dirty region x, int the y value of the dirty region y, int the width of the dirty region width, int the height of the dirty region height)Overrides java. Adds the specified region to the dirty region list if the component is showing. |
| public void | |
| public boolean | Returns: true if this component can request to get the input focus, false if it can not
Deprecated
As of 1.4, replaced by
FocusTraversalPolicy.getDefaultComponent(Container).requestFocus()
In release 1.4, the focus subsystem was rearchitected. |
| public void | requestFocus()
Overrides java. Requests that this |
| public boolean | Returns: false if the focus change request is guaranteed to
fail; true if it is likely to succeedboolean indicating if the focus change is temporary temporary)Overrides java. Requests that this |
| public boolean | Returns: false if the focus change request is guaranteed to
fail; true if it is likely to succeedOverrides java. Requests that this |
| protected boolean | Returns: false if the focus change request is guaranteed to
fail; true if it is likely to succeedboolean indicating if the focus change is temporary temporary)Overrides java. Requests that this |
| public void | |
| public void | reshape(int
the new horizontal location x, int the new vertical location y, int the new width w, int the new height h)Overrides java.
Deprecated
As of JDK 5,
replaced by
Component.setBounds(int, int, int, int).
Moves and resizes this component. Reshapes the bounding rectangle for this component. |
| public void | |
| pack-priv static Graphics | |
| pack-priv static Graphics | |
| public void | scrollRectToVisible(Rectangle
the visible aRect)RectangleForwards the |
| public final void | |
| public void | |
| public void | |
| public void | setAutoscrolls(boolean
if true, synthetic mouse dragged events
are generated when the mouse is dragged outside of a component's
bounds and the mouse button continues to be held down; otherwise
false autoscrolls)Sets the |
| public void | setBackground(Color
the desired background bg)ColorOverrides java. Sets the background color of this component. |
| public void | |
| public void | setComponentPopupMenu(JPopupMenu
the popup that will be assigned to this component
may be null popup)Sets the |
| pack-priv void | setCreatedDoubleBuffer(boolean
true if the double buffer image was created from this component newValue)This is invoked by the |
| public void | setDebugGraphicsOptions(int
determines how the component should display
the information; one of the following options:
debugOptions)
debugOptions is bitwise OR'd into the current valueEnables or disables diagnostic information about every graphics operation performed within the component or one of its children. |
| public static void | setDefaultLocale(Locale
the desired default l)Locale for new components.Sets the default locale used to initialize each JComponent's locale property upon creation. |
| public void | setDoubleBuffered(boolean
if true, set this component to be double buffered aFlag)Sets whether this component should use a buffer to paint. |
| pack-priv Object | Returns: any saved state for this component, ornull if nonethe drop location (as calculated by
location,dropLocationForPoint) or null
if there's no longer a valid drop locationthe state object saved earlier for this component,
or state, boolean nullwhether or not the method is being called because an
actual drop occurred forDrop)Called to set or clear the drop location during a DnD operation. |
| public void | setEnabled(boolean
true if this component should be enabled, false otherwise enabled)Overrides java. Sets whether or not this component is enabled. |
| private void | |
| public void | setFocusTraversalKeys(int
one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, or
KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS id, Set<? extends AWTKeyStroke> the Set of AWTKeyStroke for the specified operation keystrokes)Overrides java. Sets the focus traversal keys for a given traversal operation for this Component. |
| public void | setFont(Font
the desired font)Font for this componentOverrides java. Sets the font for this component. |
| public void | setForeground(Color
the desired foreground fg)ColorOverrides java. Sets the foreground color of this component. |
| public void | setInheritsPopupMenu(boolean
whether or not the JPopupMenu is inherited value)Sets whether or not |
| public final void | setInputMap(int
one of the values listed above condition, InputMap the map)InputMap to use for the given conditionSets the |
| public void | setInputVerifier(InputVerifier
the new input verifier inputVerifier)Sets the input verifier for this component. |
| public void | setMaximumSize(Dimension
a maximumSize)Dimension containing the
desired maximum allowable sizeOverrides java. Sets the maximum size of this component to a constant value. |
| public void | setMinimumSize(Dimension
the new minimum size of this component minimumSize)Overrides java. Sets the minimum size of this component to a constant value. |
| public void | setNextFocusableComponent(Component
the aComponent)Component that should follow this
JComponent in the focus traversal cycle
Deprecated
As of 1.4, replaced by
FocusTraversalPolicy
In release 1.4, the focus subsystem was rearchitected. |
| public void | setOpaque(boolean
true if this component should be opaque isOpaque)If true the component paints every pixel within its bounds. |
| pack-priv void | |
| public void | setPreferredSize(Dimension preferredSize)
Overrides java. Sets the preferred size of this component. |
| public void | setRequestFocusEnabled(boolean
indicates whether you want this
requestFocusEnabled)JComponent to be focusable or notProvides a hint as to whether or not this |
| public void | setToolTipText(String
the string to display; if the text is text)null,
the tool tip is turned off for this componentRegisters the text to display in a tool tip. |
| public void | setTransferHandler(TransferHandler
the new newHandler)TransferHandlerSets the |
| protected void | |
| pack-priv void | |
| public void | setVerifyInputWhenFocusTarget(boolean
value for the
verifyInputWhenFocusTarget)verifyInputWhenFocusTarget propertySets the value to indicate whether input verifier for the current focus owner will be called before this component requests focus. |
| public void | setVisible(boolean
true to make the component visible; false to
make it invisible aFlag)Overrides java. Makes the component visible or invisible. |
| pack-priv static void | |
| pack-priv int | shouldDebugGraphics()
Returns true if debug information is enabled for this
|
| pack-priv void | |
| private void | uninstallUIAndProperties()
Uninstalls the UI, if any, and any client properties designated
as being specific to the installed UI - instances of
|
| public void | unregisterKeyboardAction(KeyStroke
the keystroke for which to unregister its
keyboard action aKeyStroke)This method is now obsolete. |
| private void | unregisterWithKeyboardManager()
Unregisters all the previously registered
|
| private void | |
| public void | update(Graphics
the g)Graphics context in which to paintOverrides java. Calls |
| public void | updateUI()
This method is called to update the UI property to a value from the current look and feel. |
| private float | |
| private void | writeObject(ObjectOutputStream
the s)ObjectOutputStream in which to writeHides java. Before writing a |