Uses of Class
java.awt.Component
-
Packages that use Component Package Description com.sun.java.accessibility.util Provides a collection of interfaces and classes that compose the Java Accessibility Utilities.java.applet Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.java.awt.dnd Drag and Drop is a direct manipulation gesture found in many Graphical User Interface systems that provides a mechanism to transfer information between two entities logically associated with presentation elements in the GUI.java.awt.event Provides interfaces and classes for dealing with different types of events fired by AWT components.java.awt.im Provides classes and interfaces for the input method framework.java.beans Contains classes related to developing beans -- components based on the JavaBeans™ architecture.java.beans.beancontext Provides classes and interfaces relating to bean context.javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.javax.swing.border Provides classes and interface for drawing specialized borders around a Swing component.javax.swing.colorchooser Contains classes and interfaces used by theJColorChoosercomponent.javax.swing.event Provides for events fired by Swing components.javax.swing.plaf Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.javax.swing.plaf.basic Provides user interface objects built according to the Basic look and feel.javax.swing.plaf.metal Provides user interface objects built according to the Java look and feel (once codenamed Metal), which is the default look and feel.javax.swing.plaf.synth Synth is a skinnable look and feel in which all painting is delegated.javax.swing.table Provides classes and interfaces for dealing withjavax.swing.JTable.javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.javax.swing.text.html Provides the classHTMLEditorKitand supporting classes for creating HTML text editors.javax.swing.tree Provides classes and interfaces for dealing withjavax.swing.JTree. -
-
Uses of Component in com.sun.java.accessibility.util
Fields in com.sun.java.accessibility.util declared as Component Modifier and Type Field Description protected static ComponentAWTEventMonitor. componentWithFocusDeprecated, for removal: This API element is subject to removal in a future version.This field is unused; to get the component with focus use the getComponentWithFocus method.Methods in com.sun.java.accessibility.util that return Component Modifier and Type Method Description static ComponentAWTEventMonitor. getComponentWithFocus()Returns the component that currently has keyboard focus. -
Uses of Component in java.applet
Subclasses of Component in java.applet Modifier and Type Class Description classAppletDeprecated.The Applet API is deprecated, no replacement. -
Uses of Component in java.awt
Subclasses of Component in java.awt Modifier and Type Class Description classButtonThis class creates a labeled button.classCanvasACanvascomponent represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.classCheckboxA check box is a graphical component that can be in either an "on" (true) or "off" (false) state.classChoiceTheChoiceclass presents a pop-up menu of choices.classContainerA generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.classDialogA Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user.classFileDialogTheFileDialogclass displays a dialog window from which the user can select a file.classFrameAFrameis a top-level window with a title and a border.classLabelALabelobject is a component for placing text in a container.classListTheListcomponent presents the user with a scrolling list of text items.classPanelPanelis the simplest container class.classScrollbarTheScrollbarclass embodies a scroll bar, a familiar user-interface object.classScrollPaneA container class which implements automatic horizontal and/or vertical scrolling for a single child component.classTextAreaATextAreaobject is a multi-line region that displays text.classTextComponentTheTextComponentclass is the superclass of any component that allows the editing of some text.classTextFieldATextFieldobject is a text component that allows for the editing of a single line of text.classWindowAWindowobject is a top-level window with no borders and no menubar.Fields in java.awt with type parameters of type Component Modifier and Type Field Description protected Hashtable<Component,GridBagConstraints>GridBagLayout. comptableThis hashtable maintains the association between a component and its gridbag constraints.Methods in java.awt that return Component Modifier and Type Method Description ComponentContainer. add(Component comp)Appends the specified component to the end of this container.ComponentContainer. add(Component comp, int index)Adds the specified component to this container at the given position.ComponentContainer. add(String name, Component comp)Adds the specified component to this container.ComponentContainer. findComponentAt(int x, int y)Locates the visible child component that contains the specified position.ComponentContainer. findComponentAt(Point p)Locates the visible child component that contains the specified point.ComponentContainer. getComponent(int n)Gets the nth component in this container.ComponentContainerOrderFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)Returns the Component that should receive the focus after aComponent.abstract ComponentFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)Returns the Component that should receive the focus after aComponent.ComponentComponent. getComponentAt(int x, int y)Determines if this component or one of its immediate subcomponents contains the (x, y) location, and if so, returns the containing component.ComponentComponent. getComponentAt(Point p)Returns the component or subcomponent that contains the specified point.ComponentContainer. getComponentAt(int x, int y)Locates the component that contains the x,y position.ComponentContainer. getComponentAt(Point p)Gets the component that contains the specified point.ComponentContainerOrderFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)Returns the Component that should receive the focus before aComponent.abstract ComponentFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)Returns the Component that should receive the focus before aComponent.Component[]Container. getComponents()Gets all the components in this container.ComponentContainerOrderFocusTraversalPolicy. getDefaultComponent(Container aContainer)Returns the default Component to focus.abstract ComponentFocusTraversalPolicy. getDefaultComponent(Container aContainer)Returns the default Component to focus.ComponentContainerOrderFocusTraversalPolicy. getFirstComponent(Container aContainer)Returns the first Component in the traversal cycle.abstract ComponentFocusTraversalPolicy. getFirstComponent(Container aContainer)Returns the first Component in the traversal cycle.ComponentKeyboardFocusManager. getFocusOwner()Returns the focus owner, if the focus owner is in the same context as the calling thread.ComponentWindow. getFocusOwner()Returns the child Component of this Window that has focus if this Window is focused; returns null otherwise.protected ComponentKeyboardFocusManager. getGlobalFocusOwner()Returns the focus owner, even if the calling thread is in a different context than the focus owner.protected ComponentKeyboardFocusManager. getGlobalPermanentFocusOwner()Returns the permanent focus owner, even if the calling thread is in a different context than the permanent focus owner.ComponentFocusTraversalPolicy. getInitialComponent(Window window)Returns the Component that should receive the focus when a Window is made visible for the first time.ComponentContainerOrderFocusTraversalPolicy. getLastComponent(Container aContainer)Returns the last Component in the traversal cycle.abstract ComponentFocusTraversalPolicy. getLastComponent(Container aContainer)Returns the last Component in the traversal cycle.ComponentBorderLayout. getLayoutComponent(Container target, Object constraints)Returns the component that corresponds to the given constraint location based on the targetContainer's component orientation.ComponentBorderLayout. getLayoutComponent(Object constraints)Gets the component that was added using the given constraintComponentWindow. getMostRecentFocusOwner()Returns the child Component of this Window that will receive the focus when this Window is focused.ComponentKeyboardFocusManager. getPermanentFocusOwner()Returns the permanent focus owner, if the permanent focus owner is in the same context as the calling thread.ComponentComponent. locate(int x, int y)Deprecated.As of JDK version 1.1, replaced by getComponentAt(int, int).ComponentContainer. locate(int x, int y)Deprecated.As of JDK version 1.1, replaced bygetComponentAt(int, int).Methods in java.awt with parameters of type Component Modifier and Type Method Description protected booleanContainerOrderFocusTraversalPolicy. accept(Component aComponent)Determines whether a Component is an acceptable choice as the new focus owner.protected booleanDefaultFocusTraversalPolicy. accept(Component aComponent)Determines whether a Component is an acceptable choice as the new focus owner.ComponentContainer. add(Component comp)Appends the specified component to the end of this container.ComponentContainer. add(Component comp, int index)Adds the specified component to this container at the given position.voidContainer. add(Component comp, Object constraints)Adds the specified component to the end of this container.voidContainer. add(Component comp, Object constraints, int index)Adds the specified component to this container with the specified constraints at the specified index.ComponentContainer. add(String name, Component comp)Adds the specified component to this container.protected voidContainer. addImpl(Component comp, Object constraints, int index)Adds the specified component to this container at the specified index.protected voidScrollPane. addImpl(Component comp, Object constraints, int index)Adds the specified component to this scroll pane container.voidBorderLayout. addLayoutComponent(Component comp, Object constraints)Adds the specified component to the layout, using the specified constraint object.voidBorderLayout. addLayoutComponent(String name, Component comp)Deprecated.replaced byaddLayoutComponent(Component, Object).voidCardLayout. addLayoutComponent(Component comp, Object constraints)Adds the specified component to this card layout's internal table of names.voidCardLayout. addLayoutComponent(String name, Component comp)Deprecated.replaced byaddLayoutComponent(Component, Object).voidFlowLayout. addLayoutComponent(String name, Component comp)Adds the specified component to the layout.voidGridBagLayout. addLayoutComponent(Component comp, Object constraints)Adds the specified component to the layout, using the specifiedconstraintsobject.voidGridBagLayout. addLayoutComponent(String name, Component comp)Has no effect, since this layout manager does not use a per-component string.voidGridLayout. addLayoutComponent(String name, Component comp)Adds the specified component with the specified name to the layout.voidLayoutManager. addLayoutComponent(String name, Component comp)If the layout manager uses a per-component string, adds the componentcompto the layout, associating it with the string specified byname.voidLayoutManager2. addLayoutComponent(Component comp, Object constraints)Adds the specified component to the layout, using the specified constraint object.<T extends DragGestureRecognizer>
TToolkit. createDragGestureRecognizer(Class<T> abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl)Creates a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associates it with the DragSource, Component and DragGestureListener specified.protected voidDefaultKeyboardFocusManager. dequeueKeyEvents(long after, Component untilFocused)Releases for normal dispatching to the current focus owner all KeyEvents which were enqueued because of a call toenqueueKeyEventswith the same timestamp and Component.protected abstract voidKeyboardFocusManager. dequeueKeyEvents(long after, Component untilFocused)Called by the AWT to notify the KeyboardFocusManager that it should cancel delayed dispatching of KeyEvents.protected voidDefaultKeyboardFocusManager. discardKeyEvents(Component comp)Discards all KeyEvents which were enqueued because of one or more calls toenqueueKeyEventswith the specified Component, or one of its descendants.protected abstract voidKeyboardFocusManager. discardKeyEvents(Component comp)Called by the AWT to notify the KeyboardFocusManager that it should cancel delayed dispatching of KeyEvents.protected voidDefaultKeyboardFocusManager. enqueueKeyEvents(long after, Component untilFocused)Delays dispatching of KeyEvents until the specified Component becomes the focus owner.protected abstract voidKeyboardFocusManager. enqueueKeyEvents(long after, Component untilFocused)Called by the AWT to notify the KeyboardFocusManager that it should delay dispatching of KeyEvents until the specified Component becomes the focus owner.voidDefaultKeyboardFocusManager. focusNextComponent(Component aComponent)Focuses the Component after aComponent, typically based on a FocusTraversalPolicy.abstract voidKeyboardFocusManager. focusNextComponent(Component aComponent)Focuses the Component after aComponent, typically based on a FocusTraversalPolicy.voidDefaultKeyboardFocusManager. focusPreviousComponent(Component aComponent)Focuses the Component before aComponent, typically based on a FocusTraversalPolicy.abstract voidKeyboardFocusManager. focusPreviousComponent(Component aComponent)Focuses the Component before aComponent, typically based on a FocusTraversalPolicy.ComponentContainerOrderFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)Returns the Component that should receive the focus after aComponent.abstract ComponentFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)Returns the Component that should receive the focus after aComponent.ComponentContainerOrderFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)Returns the Component that should receive the focus before aComponent.abstract ComponentFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)Returns the Component that should receive the focus before aComponent.intContainer. getComponentZOrder(Component comp)Returns the z-order index of the component inside the container.ObjectBorderLayout. getConstraints(Component comp)Gets the constraints for the specified componentGridBagConstraintsGridBagLayout. getConstraints(Component comp)Gets the constraints for the specified component.protected static ContainerToolkit. getNativeContainer(Component c)Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).booleanContainer. isAncestorOf(Component c)Checks if the component is contained in the component hierarchy of this container.protected GridBagConstraintsGridBagLayout. lookupConstraints(Component comp)Retrieves the constraints for the specified component.voidDefaultKeyboardFocusManager. processKeyEvent(Component focusedComponent, KeyEvent e)This method initiates a focus traversal operation if and only if the KeyEvent represents a focus traversal key for the specified focusedComponent.abstract voidKeyboardFocusManager. processKeyEvent(Component focusedComponent, KeyEvent e)This method initiates a focus traversal operation if and only if the KeyEvent represents a focus traversal key for the specified focusedComponent.voidKeyboardFocusManager. redispatchEvent(Component target, AWTEvent e)Redispatches an AWTEvent in such a way that the AWT event dispatcher will not recursively request that the KeyboardFocusManager, or any installed KeyEventDispatchers, dispatch the event again.voidContainer. remove(Component comp)Removes the specified component from this container.voidBorderLayout. removeLayoutComponent(Component comp)Removes the specified component from this border layout.voidCardLayout. removeLayoutComponent(Component comp)Removes the specified component from the layout.voidFlowLayout. removeLayoutComponent(Component comp)Removes the specified component from the layout.voidGridBagLayout. removeLayoutComponent(Component comp)Removes the specified component from this layout.voidGridLayout. removeLayoutComponent(Component comp)Removes the specified component from the layout.voidLayoutManager. removeLayoutComponent(Component comp)Removes the specified component from the layout.voidContainer. setComponentZOrder(Component comp, int index)Moves the specified component to the specified z-order index in the container.voidGridBagLayout. setConstraints(Component comp, GridBagConstraints constraints)Sets the constraints for the specified component in this layout.protected voidKeyboardFocusManager. setGlobalFocusOwner(Component focusOwner)Sets the focus owner.protected voidKeyboardFocusManager. setGlobalPermanentFocusOwner(Component permanentFocusOwner)Sets the permanent focus owner.voidWindow. setLocationRelativeTo(Component c)Sets the location of the window relative to the specified component according to the following scenarios.voidPopupMenu. show(Component origin, int x, int y)Shows the popup menu at the x, y position relative to an origin component.voidDefaultKeyboardFocusManager. upFocusCycle(Component aComponent)Moves the focus up one focus traversal cycle.abstract voidKeyboardFocusManager. upFocusCycle(Component aComponent)Moves the focus up one focus traversal cycle.Constructors in java.awt with parameters of type Component Constructor Description MediaTracker(Component comp)Creates a media tracker to track images for a given component. -
Uses of Component in java.awt.dnd
Fields in java.awt.dnd declared as Component Modifier and Type Field Description protected ComponentDragGestureRecognizer. componentTheComponentassociated with thisDragGestureRecognizer.Methods in java.awt.dnd that return Component Modifier and Type Method Description ComponentDragGestureEvent. getComponent()Returns theComponentassociated with thisDragGestureEvent.ComponentDragGestureRecognizer. getComponent()This method returns theComponentthat is to be "observed" by theDragGestureRecognizerfor drag initiating gestures.ComponentDragSourceContext. getComponent()Returns theComponentassociated with thisDragSourceContext.ComponentDropTarget. getComponent()Gets theComponentassociated with thisDropTarget.ComponentDropTargetContext. getComponent()This method returns theComponentassociated with thisDropTargetContext.Methods in java.awt.dnd with parameters of type Component Modifier and Type Method Description DragGestureRecognizerDragSource. createDefaultDragGestureRecognizer(Component c, int actions, DragGestureListener dgl)Creates a newDragGestureRecognizerthat implements the default abstract subclass ofDragGestureRecognizerfor thisDragSource, and sets the specifiedComponentandDragGestureListeneron the newly created object.<T extends DragGestureRecognizer>
TDragSource. createDragGestureRecognizer(Class<T> recognizerAbstractClass, Component c, int actions, DragGestureListener dgl)Creates a newDragGestureRecognizerthat implements the specified abstract subclass ofDragGestureRecognizer, and sets the specifiedComponentandDragGestureListeneron the newly created object.protected DropTarget.DropTargetAutoScrollerDropTarget. createDropTargetAutoScroller(Component c, Point p)create an embedded autoscrollervoidDragGestureRecognizer. setComponent(Component c)set the Component that the DragGestureRecognizer is associated with registerListeners() and unregisterListeners() are called as a side effect as appropriate.voidDropTarget. setComponent(Component c)Note: this interface is required to permit the safe association of a DropTarget with a Component in one of two ways, either:component.setDropTarget(droptarget);ordroptarget.setComponent(component);Constructors in java.awt.dnd with parameters of type Component Constructor Description DragGestureRecognizer(DragSource ds, Component c)Construct a newDragGestureRecognizergiven theDragSourceto be used in this Drag and Drop operation, and theComponentthisDragGestureRecognizershould "observe" for drag initiating gestures.DragGestureRecognizer(DragSource ds, Component c, int sa)Construct a newDragGestureRecognizergiven theDragSourceto be used in this Drag and Drop operation, theComponentthisDragGestureRecognizershould "observe" for drag initiating gestures, and the action(s) supported for this Drag and Drop operation.DragGestureRecognizer(DragSource ds, Component c, int sa, DragGestureListener dgl)Construct a newDragGestureRecognizergiven theDragSourceto be used in this Drag and Drop operation, theComponentthisDragGestureRecognizershould "observe" for drag initiating gestures, the action(s) supported for this Drag and Drop operation, and theDragGestureListenerto notify once a drag initiating gesture has been detected.DropTarget(Component c, int ops, DropTargetListener dtl)Creates aDropTargetgiven theComponentto associate itself with, anintrepresenting the default acceptable action(s) to support, and aDropTargetListenerto handle event processing.DropTarget(Component c, int ops, DropTargetListener dtl, boolean act)Creates aDropTargetgiven theComponentto associate itself with, anintrepresenting the default acceptable action(s) to support, aDropTargetListenerto handle event processing, and abooleanindicating if theDropTargetis currently accepting drops.DropTarget(Component c, int ops, DropTargetListener dtl, boolean act, FlavorMap fm)Creates a new DropTarget given theComponentto associate itself with, anintrepresenting the default acceptable action(s) to support, aDropTargetListenerto handle event processing, abooleanindicating if theDropTargetis currently accepting drops, and aFlavorMapto use (or null for the defaultFlavorMap).DropTarget(Component c, DropTargetListener dtl)Creates aDropTargetgiven theComponentto associate itself with, and theDropTargetListenerto handle event processing.DropTargetAutoScroller(Component c, Point p)construct a DropTargetAutoScrollerMouseDragGestureRecognizer(DragSource ds, Component c)Construct a newMouseDragGestureRecognizergiven theDragSourcefor theComponentc, and theComponentto observe.MouseDragGestureRecognizer(DragSource ds, Component c, int act)Construct a newMouseDragGestureRecognizergiven theDragSourcefor theComponentc, theComponentto observe, and the action(s) permitted for this drag operation.MouseDragGestureRecognizer(DragSource ds, Component c, int act, DragGestureListener dgl)Construct a newMouseDragGestureRecognizergiven theDragSourcefor theComponentc, theComponentto observe, the action(s) permitted for this drag operation, and theDragGestureListenerto notify when a drag gesture is detected. -
Uses of Component in java.awt.event
Methods in java.awt.event that return Component Modifier and Type Method Description ComponentHierarchyEvent. getChanged()Returns the Component at the top of the hierarchy which was changed.ComponentContainerEvent. getChild()Returns the component that was affected by the event.ComponentComponentEvent. getComponent()Returns the originator of the event.ComponentHierarchyEvent. getComponent()Returns the originator of the event.ComponentFocusEvent. getOppositeComponent()Returns the other Component involved in this focus change.Constructors in java.awt.event with parameters of type Component Constructor Description ComponentEvent(Component source, int id)Constructs aComponentEventobject.ContainerEvent(Component source, int id, Component child)Constructs aContainerEventobject.FocusEvent(Component source, int id)Constructs aFocusEventobject and identifies it as a permanent change in focus.FocusEvent(Component source, int id, boolean temporary)Constructs aFocusEventobject and identifies whether or not the change is temporary.FocusEvent(Component source, int id, boolean temporary, Component opposite)Constructs aFocusEventobject with the specified temporary state, oppositeComponentand theCause.UNKNOWNcause.FocusEvent(Component source, int id, boolean temporary, Component opposite, FocusEvent.Cause cause)Constructs aFocusEventobject with the specified temporary state, oppositeComponentand the cause.HierarchyEvent(Component source, int id, Component changed, Container changedParent)Constructs anHierarchyEventobject to identify a change in theComponenthierarchy.HierarchyEvent(Component source, int id, Component changed, Container changedParent, long changeFlags)Constructs anHierarchyEventobject to identify a change in theComponenthierarchy.InputMethodEvent(Component source, int id, long when, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)Constructs anInputMethodEventwith the specified source component, type, time, text, caret, and visiblePosition.InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition)Constructs anInputMethodEventwith the specified source component, type, caret, and visiblePosition.InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)Constructs anInputMethodEventwith the specified source component, type, text, caret, and visiblePosition.KeyEvent(Component source, int id, long when, int modifiers, int keyCode)Deprecated.as of JDK1.1; useKeyEvent(Component, int, long, int, int, char)insteadKeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar)Constructs aKeyEventobject.KeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, int keyLocation)Constructs aKeyEventobject.MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger)Constructs aMouseEventobject with the specified source component, type, modifiers, coordinates, click count, and popupTrigger flag.MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button)Constructs aMouseEventobject with the specified source component, type, time, modifiers, coordinates, click count, popupTrigger flag, and button number.MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int button)Constructs aMouseEventobject with the specified source component, type, time, modifiers, coordinates, absolute coordinates, click count, popupTrigger flag, and button number.MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation)Constructs aMouseWheelEventobject with the specified source component, type, modifiers, coordinates, scroll type, scroll amount, and wheel rotation.MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation)Constructs aMouseWheelEventobject with the specified source component, type, modifiers, coordinates, absolute coordinates, scroll type, scroll amount, and wheel rotation.MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation, double preciseWheelRotation)Constructs aMouseWheelEventobject with the specified source component, type, modifiers, coordinates, absolute coordinates, scroll type, scroll amount, and wheel rotation.PaintEvent(Component source, int id, Rectangle updateRect)Constructs aPaintEventobject with the specified source component and type. -
Uses of Component in java.awt.im
Methods in java.awt.im with parameters of type Component Modifier and Type Method Description voidInputContext. removeNotify(Component client)Notifies the input context that a client component has been removed from its containment hierarchy, or that input method support has been disabled for the component. -
Uses of Component in java.beans
Methods in java.beans that return Component Modifier and Type Method Description ComponentPropertyEditor. getCustomEditor()A PropertyEditor may choose to make available a full custom Component that edits its property value.ComponentPropertyEditorSupport. getCustomEditor()A PropertyEditor may chose to make available a full custom Component that edits its property value. -
Uses of Component in java.beans.beancontext
Methods in java.beans.beancontext that return Component Modifier and Type Method Description ComponentBeanContextChildComponentProxy. getComponent()Gets thejava.awt.Componentassociated with thisBeanContextChild. -
Uses of Component in javax.swing
Classes in javax.swing with type parameters of type Component Modifier and Type Class Description classJLayer<V extends Component>JLayeris a universal decorator for Swing components which enables you to implement various advanced painting effects as well as receive notifications of allAWTEvents generated within its borders.Subclasses of Component in javax.swing Modifier and Type Class Description classAbstractButtonDefines common behaviors for buttons and menu items.classBoxA lightweight container that uses a BoxLayout object as its layout manager.static classBox.FillerAn implementation of a lightweight component that participates in layout but has no view.classCellRendererPaneThis class is inserted in between cell renderers and the components that use them.classDefaultListCellRendererRenders an item in a list.static classDefaultListCellRenderer.UIResourceA subclass of DefaultListCellRenderer that implements UIResource.classJAppletDeprecated.The Applet API is deprecated, no replacement.classJButtonAn implementation of a "push" button.classJCheckBoxAn implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.classJCheckBoxMenuItemA menu item that can be selected or deselected.classJColorChooserJColorChooserprovides a pane of controls designed to allow a user to manipulate and select a color.classJComboBox<E>A component that combines a button or editable field and a drop-down list.classJComponentThe base class for all Swing components except top-level containers.classJDesktopPaneA container used to create a multiple-document interface or a virtual desktop.classJDialogThe main class for creating a dialog window.classJEditorPaneA text component to edit various kinds of content.classJFileChooserJFileChooserprovides a simple mechanism for the user to choose a file.classJFormattedTextFieldJFormattedTextFieldextendsJTextFieldadding support for formatting arbitrary values, as well as retrieving a particular object once the user has edited the text.classJFrameAn extended version ofjava.awt.Framethat adds support for the JFC/Swing component architecture.classJInternalFrameA lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar.static classJInternalFrame.JDesktopIconThis component represents an iconified version of aJInternalFrame.classJLabelA display area for a short text string or an image, or both.classJLayer<V extends Component>JLayeris a universal decorator for Swing components which enables you to implement various advanced painting effects as well as receive notifications of allAWTEvents generated within its borders.classJLayeredPaneJLayeredPaneadds depth to a JFC/Swing container, allowing components to overlap each other when needed.classJList<E>A component that displays a list of objects and allows the user to select one or more items.classJMenuAn implementation of a menu -- a popup window containingJMenuItems that is displayed when the user selects an item on theJMenuBar.classJMenuBarAn implementation of a menu bar.classJMenuItemAn implementation of an item in a menu.classJOptionPaneJOptionPanemakes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.classJPanelJPanelis a generic lightweight container.classJPasswordFieldJPasswordFieldis a lightweight component that allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters.classJPopupMenuAn implementation of a popup menu -- a small window that pops up and displays a series of choices.static classJPopupMenu.SeparatorA popup menu-specific separator.classJProgressBarA component that visually displays the progress of some task.classJRadioButtonAn implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.classJRadioButtonMenuItemAn implementation of a radio button menu item.classJRootPaneA lightweight container used behind the scenes byJFrame,JDialog,JWindow,JApplet, andJInternalFrame.classJScrollBarAn implementation of a scrollbar.classJScrollPaneProvides a scrollable view of a lightweight component.protected classJScrollPane.ScrollBarBy defaultJScrollPanecreates scrollbars that are instances of this class.classJSeparatorJSeparatorprovides a general purpose component for implementing divider lines - most commonly used as a divider between menu items that breaks them up into logical groupings.classJSliderA component that lets the user graphically select a value by sliding a knob within a bounded interval.classJSpinnerA single line input field that lets the user select a number or an object value from an ordered sequence.static classJSpinner.DateEditorAn editor for aJSpinnerwhose model is aSpinnerDateModel.static classJSpinner.DefaultEditorA simple base class for more specialized editors that displays a read-only view of the model's current value with aJFormattedTextField.static classJSpinner.ListEditorAn editor for aJSpinnerwhose model is aSpinnerListModel.static classJSpinner.NumberEditorAn editor for aJSpinnerwhose model is aSpinnerNumberModel.classJSplitPaneJSplitPaneis used to divide two (and only two)Components.classJTabbedPaneA component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.classJTableTheJTableis used to display and edit regular two-dimensional tables of cells.classJTextAreaAJTextAreais a multi-line area that displays plain text.classJTextFieldJTextFieldis a lightweight component that allows the editing of a single line of text.classJTextPaneA text component that can be marked up with attributes that are represented graphically.classJToggleButtonAn implementation of a two-state button.classJToolBarJToolBarprovides a component that is useful for displaying commonly usedActions or controls.static classJToolBar.SeparatorA toolbar-specific separator.classJToolTipUsed to display a "Tip" for a Component.classJTreeA control that displays a set of hierarchical data as an outline.classJViewportThe "viewport" or "porthole" through which you see the underlying information.classJWindowAJWindowis a container that can be displayed anywhere on the user's desktop.Fields in javax.swing declared as Component Modifier and Type Field Description protected static ComponentImageIcon. componentDeprecated.since 1.8protected ComponentJTable. editorCompIf editing, theComponentthat is handling the editing.protected ComponentJRootPane. glassPaneThe glass pane that overlays the menu bar and content pane, so it can intercept mouse movements and such.protected ComponentJLabel. labelForThe Component this label is for; null if the label is not the label for a componentprotected ComponentJSplitPane. leftComponentThe left or top component.protected ComponentJScrollPane. lowerLeftThe component to display in the lower left corner.protected ComponentScrollPaneLayout. lowerLeftThe component to display in the lower left corner.protected ComponentJScrollPane. lowerRightThe component to display in the lower right corner.protected ComponentScrollPaneLayout. lowerRightThe component to display in the lower right corner.protected ComponentJSplitPane. rightComponentThe right or bottom component.protected ComponentJScrollPane. upperLeftThe component to display in the upper left corner.protected ComponentScrollPaneLayout. upperLeftThe component to display in the upper left corner.protected ComponentJScrollPane. upperRightThe component to display in the upper right corner.protected ComponentScrollPaneLayout. upperRightThe component to display in the upper right corner.Methods in javax.swing that return Component Modifier and Type Method Description ComponentJMenu. add(Component c)Appends a component to the end of this menu.ComponentJMenu. add(Component c, int index)Adds the specified component to this container at the given position.ComponentJTabbedPane. add(Component component)Adds acomponentwith a tab title defaulting to the name of the component which is the result of callingcomponent.getName.ComponentJTabbedPane. add(Component component, int index)Adds acomponentat the specified tab index with a tab title defaulting to the name of the component.ComponentJTabbedPane. add(String title, Component component)Adds acomponentwith the specified tab title.protected ComponentScrollPaneLayout. addSingletonComponent(Component oldC, Component newC)Removes an existing component.ComponentMenuSelectionManager. componentForPoint(Component source, Point sourcePoint)Returns the component in the currently selected path which contains sourcePoint.protected ComponentJRootPane. createGlassPane()Called by the constructor methods to create the defaultglassPane.static ComponentBox. createGlue()Creates an invisible "glue" component that can be useful in a Box whose visible components have a maximum width (for a horizontal box) or height (for a vertical box).static ComponentBox. createHorizontalGlue()Creates a horizontal glue component.static ComponentBox. createHorizontalStrut(int width)Creates an invisible, fixed-width component.static ComponentBox. createRigidArea(Dimension d)Creates an invisible component that's always the specified size.static ComponentBox. createVerticalGlue()Creates a vertical glue component.static ComponentBox. createVerticalStrut(int height)Creates an invisible, fixed-height component.static ComponentSwingUtilities. findFocusOwner(Component c)Deprecated.As of 1.4, replaced byKeyboardFocusManager.getFocusOwner().ComponentJSplitPane. getBottomComponent()Returns the component below, or to the right of the divider.ComponentDefaultCellEditor. getComponent()Returns a reference to the editor component.ComponentJMenu. getComponent()Returns thejava.awt.Componentused to paint thisMenuElement.ComponentJMenuBar. getComponent()Implemented to be aMenuElement.ComponentJMenuItem. getComponent()Returns thejava.awt.Componentused to paint this object.ComponentJPopupMenu. getComponent()Returns thisJPopupMenucomponent.ComponentMenuElement. getComponent()This method should return thejava.awt.Componentused to paint the receiving element.ComponentRenderer. getComponent()Returns the component used to render the value.ComponentTransferHandler.TransferSupport. getComponent()Returns the target component of this transfer.ComponentDefaultFocusManager. getComponentAfter(Container aContainer, Component aComponent)Returns the component after.ComponentLayoutFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)Returns the Component that should receive the focus after aComponent.ComponentSortingFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)Returns the Component that should receive the focus after aComponent.ComponentJTabbedPane. getComponentAt(int index)Returns the component atindex.ComponentJMenuBar. getComponentAtIndex(int i)Deprecated.replaced bygetComponent(int i)ComponentJPopupMenu. getComponentAtIndex(int i)Deprecated.replaced byContainer.getComponent(int)ComponentJToolBar. getComponentAtIndex(int i)Returns the component at the specified index.ComponentDefaultFocusManager. getComponentBefore(Container aContainer, Component aComponent)Returns the component before.ComponentLayoutFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)Returns the Component that should receive the focus before aComponent.ComponentSortingFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)Returns the Component that should receive the focus before aComponent.Component[]JLayeredPane. getComponentsInLayer(int layer)Returns an array of the components in the specified layer.ComponentJScrollPane. getCorner(String key)Returns the component at the specified corner.ComponentScrollPaneLayout. getCorner(String key)Returns theComponentat the specified corner.protected ComponentJTable.AccessibleJTable.AccessibleJTableCell. getCurrentComponent()Gets the table cell renderer component.static ComponentSwingUtilities. getDeepestComponentAt(Component parent, int x, int y)Returns the deepest visible descendent Component ofparentthat contains the locationx,y.ComponentSortingFocusTraversalPolicy. getDefaultComponent(Container aContainer)Returns the default Component to focus.ComponentComboBoxEditor. getEditorComponent()Returns the component that should be added to the tree hierarchy for this editorComponentJTable. getEditorComponent()Returns the component that is handling the editing session.ComponentDefaultFocusManager. getFirstComponent(Container aContainer)Returns the first component.ComponentLayoutFocusTraversalPolicy. getFirstComponent(Container aContainer)Returns the first Component in the traversal cycle.ComponentSortingFocusTraversalPolicy. getFirstComponent(Container aContainer)Returns the first Component in the traversal cycle.ComponentJInternalFrame. getFocusOwner()If thisJInternalFrameis active, returns the child that has focus.ComponentJApplet. getGlassPane()Deprecated.Returns the glassPane object for this applet.ComponentJDialog. getGlassPane()Returns theglassPaneobject for this dialog.ComponentJFrame. getGlassPane()Returns theglassPaneobject for this frame.ComponentJInternalFrame. getGlassPane()Returns the glass pane for this internal frame.ComponentJRootPane. getGlassPane()Returns the current glass pane for thisJRootPane.ComponentJWindow. getGlassPane()Returns theglassPane Componentfor this window.ComponentRootPaneContainer. getGlassPane()Returns the glassPane.ComponentInternalFrameFocusTraversalPolicy. getInitialComponent(JInternalFrame frame)Returns the Component that should receive the focus when a JInternalFrame is selected for the first time.ComponentJPopupMenu. getInvoker()Returns the component which is the 'invoker' of this popup menu.ComponentJLabel. getLabelFor()Get the component this is labelling.ComponentDefaultFocusManager. getLastComponent(Container aContainer)Returns the last component.ComponentLayoutFocusTraversalPolicy. getLastComponent(Container aContainer)Returns the last Component in the traversal cycle.ComponentSortingFocusTraversalPolicy. getLastComponent(Container aContainer)Returns the last Component in the traversal cycle.ComponentJSplitPane. getLeftComponent()Returns the component to the left (or above) the divider.ComponentListCellRenderer. getListCellRendererComponent(JList<? extends E> list, E value, int index, boolean isSelected, boolean cellHasFocus)Return a component that has been configured to display the specified value.ComponentJMenu. getMenuComponent(int n)Returns the component at positionn.Component[]JMenu. getMenuComponents()Returns an array ofComponents of the menu's subcomponents.ComponentJInternalFrame. getMostRecentFocusOwner()Returns the child component of thisJInternalFramethat will receive the focus when thisJInternalFrameis selected.ComponentJComponent. getNextFocusableComponent()Deprecated.As of 1.4, replaced byFocusTraversalPolicy.ComponentJSplitPane. getRightComponent()Returns the component to the right (or below) the divider.static ComponentSwingUtilities. getRoot(Component c)Returns the root component for the current component tree.ComponentJTabbedPane. getSelectedComponent()Returns the currently selected component for this tabbedpane.ComponentJTabbedPane. getTabComponentAt(int index)Returns the tab component atindex.ComponentDefaultCellEditor. getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)Implements theTableCellEditorinterface.ComponentJSplitPane. getTopComponent()Returns the component above, or to the left of the divider.ComponentDefaultCellEditor. getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)Implements theTreeCellEditorinterface.static ComponentSwingUtilities. getUnwrappedView(JViewport viewport)Returns the firstJViewport's descendant which is not an instance ofJLayer.ComponentJViewport. getView()Returns theJViewport's one child ornull.ComponentJTable. prepareEditor(TableCellEditor editor, int row, int column)Prepares the editor by querying the data model for the value and selection state of the cell atrow,column.ComponentJTable. prepareRenderer(TableCellRenderer renderer, int row, int column)Prepares the renderer by querying the data model for the value and selection state of the cell atrow,column.Methods in javax.swing that return types with arguments of type Component Modifier and Type Method Description protected Comparator<? super Component>SortingFocusTraversalPolicy. getComparator()Returns the Comparator which will be used to sort the Components in a focus traversal cycle.protected Hashtable<Component,Integer>JLayeredPane. getComponentToLayer()Returns the hashtable that maps components to layers.Methods in javax.swing with parameters of type Component Modifier and Type Method Description protected booleanLayoutFocusTraversalPolicy. accept(Component aComponent)Determines whether the specifiedComponentis an acceptable choice as the new focus owner.protected booleanSortingFocusTraversalPolicy. accept(Component aComponent)Determines whether a Component is an acceptable choice as the new focus owner.ComponentJMenu. add(Component c)Appends a component to the end of this menu.ComponentJMenu. add(Component c, int index)Adds the specified component to this container at the given position.ComponentJTabbedPane. add(Component component)Adds acomponentwith a tab title defaulting to the name of the component which is the result of callingcomponent.getName.ComponentJTabbedPane. add(Component component, int index)Adds acomponentat the specified tab index with a tab title defaulting to the name of the component.voidJTabbedPane. add(Component component, Object constraints)Adds acomponentto the tabbed pane.voidJTabbedPane. add(Component component, Object constraints, int index)Adds acomponentat the specified tab index.ComponentJTabbedPane. add(String title, Component component)Adds acomponentwith the specified tab title.GroupLayout.GroupGroupLayout.Group. addComponent(Component component)Adds aComponentto thisGroup.GroupLayout.GroupGroupLayout.Group. addComponent(Component component, int min, int pref, int max)Adds aComponentto thisGroupwith the specified size.GroupLayout.ParallelGroupGroupLayout.ParallelGroup. addComponent(Component component, GroupLayout.Alignment alignment)Adds aComponentto thisParallelGroupwith the specified alignment.GroupLayout.ParallelGroupGroupLayout.ParallelGroup. addComponent(Component component, GroupLayout.Alignment alignment, int min, int pref, int max)Adds aComponentto thisParallelGroupwith the specified alignment and size.GroupLayout.SequentialGroupGroupLayout.SequentialGroup. addComponent(boolean useAsBaseline, Component component)Adds aComponentto thisGroup.GroupLayout.SequentialGroupGroupLayout.SequentialGroup. addComponent(boolean useAsBaseline, Component component, int min, int pref, int max)Adds aComponentto thisGroupwith the specified size.protected voidAbstractButton. addImpl(Component comp, Object constraints, int index)Adds the specified component to this container at the specified index, refer toContainer.addImpl(Component, Object, int)for a complete description of this method.protected voidCellRendererPane. addImpl(Component x, Object constraints, int index)If the specified component is already a child of this then we don't bother doing anything - stacking order doesn't matter for cell renderer components (CellRendererPane doesn't paint anyway).protected voidJApplet. addImpl(Component comp, Object constraints, int index)Deprecated.Adds the specified childComponent.protected voidJDesktopPane. addImpl(Component comp, Object constraints, int index)Adds the specified component to this container at the specified index.protected voidJDialog. addImpl(Component comp, Object constraints, int index)Adds the specified childComponent.protected voidJFrame. addImpl(Component comp, Object constraints, int index)Adds the specified childComponent.protected voidJInternalFrame. addImpl(Component comp, Object constraints, int index)Adds the specified childComponent.protected voidJLayer. addImpl(Component comp, Object constraints, int index)This method is not supported byJLayerand always throwsUnsupportedOperationExceptionprotected voidJRootPane. addImpl(Component comp, Object constraints, int index)Overridden to enforce the position of the glass component as the zero child.protected voidJSplitPane. addImpl(Component comp, Object constraints, int index)Adds the specified component to this split pane.protected voidJToolBar. addImpl(Component comp, Object constraints, int index)If aJButtonis being added, it is initially set to be disabled.protected voidJViewport. addImpl(Component child, Object constraints, int index)Sets theJViewport's one lightweight child, which can benull.protected voidJWindow. addImpl(Component comp, Object constraints, int index)Adds the specified childComponent.voidBoxLayout. addLayoutComponent(Component comp, Object constraints)Not used by this class.voidBoxLayout. addLayoutComponent(String name, Component comp)Not used by this class.voidGroupLayout. addLayoutComponent(Component component, Object constraints)Notification that aComponenthas been added to the parent container.voidGroupLayout. addLayoutComponent(String name, Component component)Notification that aComponenthas been added to the parent container.voidJSpinner.DefaultEditor. addLayoutComponent(String name, Component child)ThisLayoutManagermethod does nothing.voidOverlayLayout. addLayoutComponent(Component comp, Object constraints)Adds the specified component to the layout, using the specified constraint object.voidOverlayLayout. addLayoutComponent(String name, Component comp)Adds the specified component to the layout.voidScrollPaneLayout. addLayoutComponent(String s, Component c)Adds the specified component to the layout.voidSpringLayout. addLayoutComponent(Component component, Object constraints)Ifconstraintsis an instance ofSpringLayout.Constraints, associates the constraints with the specified component.voidSpringLayout. addLayoutComponent(String name, Component c)Has no effect, since this layout manager does not use a per-component string.voidViewportLayout. addLayoutComponent(String name, Component c)Adds the specified component to the layout.protected ComponentScrollPaneLayout. addSingletonComponent(Component oldC, Component newC)Removes an existing component.voidJTabbedPane. addTab(String title, Component component)Adds acomponentrepresented by atitleand no icon.voidJTabbedPane. addTab(String title, Icon icon, Component component)Adds acomponentrepresented by atitleand/oricon, either of which can benull.voidJTabbedPane. addTab(String title, Icon icon, Component component, String tip)Adds acomponentandtiprepresented by atitleand/oricon, either of which can benull.booleanDefaultFocusManager. compareTabOrder(Component a, Component b)Compares the components by their focus traversal cycle order.ComponentMenuSelectionManager. componentForPoint(Component source, Point sourcePoint)Returns the component in the currently selected path which contains sourcePoint.static MouseEventSwingUtilities. convertMouseEvent(Component source, MouseEvent sourceEvent, Component destination)Returns a MouseEvent similar tosourceEventexcept that its x and y members have been converted todestination's coordinate system.static PointSwingUtilities. convertPoint(Component source, int x, int y, Component destination)Convert the point(x,y)insourcecoordinate system todestinationcoordinate system.static PointSwingUtilities. convertPoint(Component source, Point aPoint, Component destination)Convert aaPointinsourcecoordinate system todestinationcoordinate system.static voidSwingUtilities. convertPointFromScreen(Point p, Component c)Convert a point from a screen coordinates to a component's coordinate systemstatic voidSwingUtilities. convertPointToScreen(Point p, Component c)Convert a point from a component's coordinate system to screen coordinates.static RectangleSwingUtilities. convertRectangle(Component source, Rectangle aRectangle, Component destination)Convert the rectangleaRectangleinsourcecoordinate system todestinationcoordinate system.static JDialogJColorChooser. createDialog(Component c, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener)Creates and returns a new dialog containing the specifiedColorChooserpane along with "OK", "Cancel", and "Reset" buttons.protected JDialogJFileChooser. createDialog(Component parent)Creates and returns a newJDialogwrappingthiscentered on theparentin theparent's frame.JDialogJOptionPane. createDialog(Component parentComponent, String title)Creates and returns a newJDialogwrappingthiscentered on theparentComponentin theparentComponent's frame.JInternalFrameJOptionPane. createInternalFrame(Component parentComponent, String title)Creates and returns an instance ofJInternalFrame.static RepaintManagerRepaintManager. currentManager(Component c)Return the RepaintManager for the calling thread given a Component.static ComponentSwingUtilities. findFocusOwner(Component c)Deprecated.As of 1.4, replaced byKeyboardFocusManager.getFocusOwner().static AccessibleSwingUtilities. getAccessibleAt(Component c, Point p)Returns theAccessiblechild contained at the local coordinatePoint, if one exists.static AccessibleSwingUtilities. getAccessibleChild(Component c, int i)Return the nth Accessible child of the object.static intSwingUtilities. getAccessibleChildrenCount(Component c)Returns the number of accessible children in the object.static intSwingUtilities. getAccessibleIndexInParent(Component c)Get the index of this object in its accessible parent.static AccessibleStateSetSwingUtilities. getAccessibleStateSet(Component c)Get the state of this object.static ContainerSwingUtilities. getAncestorNamed(String name, Component comp)Convenience method for searching abovecompin the component hierarchy and returns the first object ofnameit finds.static ContainerSwingUtilities. getAncestorOfClass(Class<?> c, Component comp)Convenience method for searching abovecompin the component hierarchy and returns the first object of classcit finds.ComponentDefaultFocusManager. getComponentAfter(Container aContainer, Component aComponent)Returns the component after.ComponentLayoutFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)Returns the Component that should receive the focus after aComponent.ComponentSortingFocusTraversalPolicy. getComponentAfter(Container aContainer, Component aComponent)Returns the Component that should receive the focus after aComponent.ComponentDefaultFocusManager. getComponentBefore(Container aContainer, Component aComponent)Returns the component before.ComponentLayoutFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)Returns the Component that should receive the focus before aComponent.ComponentSortingFocusTraversalPolicy. getComponentBefore(Container aContainer, Component aComponent)Returns the Component that should receive the focus before aComponent.intJMenuBar. getComponentIndex(Component c)Returns the index of the specified component.intJPopupMenu. getComponentIndex(Component c)Returns the index of the specified component.intJToolBar. getComponentIndex(Component c)Returns the index of the specified component.SpringSpringLayout. getConstraint(String edgeName, Component c)Returns the spring controlling the distance between the specified edge of the component and the top or left edge of its parent.SpringLayout.ConstraintsSpringLayout. getConstraints(Component c)Returns the constraints for the specified component.static ComponentSwingUtilities. getDeepestComponentAt(Component parent, int x, int y)Returns the deepest visible descendent Component ofparentthat contains the locationx,y.static JDesktopPaneJOptionPane. getDesktopPaneForComponent(Component parentComponent)Returns the specified component's desktop pane.static FrameJOptionPane. getFrameForComponent(Component parentComponent)Returns the specified component'sFrame.intJLayeredPane. getIndexOf(Component c)Returns the index of the specified Component.intJLayeredPane. getLayer(Component c)Returns the layer attribute for the specified Component.static JLayeredPaneJLayeredPane. getLayeredPaneAbove(Component c)Convenience method that returns the first JLayeredPane which contains the specified component.static RectangleSwingUtilities. getLocalBounds(Component aComponent)Return the rectangle (0,0,bounds.width,bounds.height) for the componentaComponentImageRepaintManager. getOffscreenBuffer(Component c, int proposedWidth, int proposedHeight)Return the offscreen buffer that should be used as a double buffer with the componentc.PopupPopupFactory. getPopup(Component owner, Component contents, int x, int y)Creates aPopupfor the Componentownercontaining the Componentcontents.protected PopupPopupFactory. getPopup(Component owner, Component contents, int x, int y, boolean isHeavyWeightPopup)Creates aPopupfor the Componentownercontaining the Componentcontents.intJLayeredPane. getPosition(Component c)Get the relative position of the component within its layer.static ComponentSwingUtilities. getRoot(Component c)Returns the root component for the current component tree.static JRootPaneSwingUtilities. getRootPane(Component c)If c is a JRootPane descendant return its JRootPane ancestor.static ContainerSwingUtilities. getUnwrappedParent(Component component)Returns the first ancestor of thecomponentwhich is not an instance ofJLayer.ImageRepaintManager. getVolatileOffscreenBuffer(Component c, int proposedWidth, int proposedHeight)Return a volatile offscreen buffer that should be used as a double buffer with the specified componentc.static WindowSwingUtilities. getWindowAncestor(Component c)Returns the firstWindowancestor ofc, ornullifcis not contained inside aWindow.static SpringSpring. height(Component c)Returns a spring whose minimum, preferred, maximum and value properties are defined by the heights of the minimumSize, preferredSize, maximumSize and size properties of the supplied component.intJTabbedPane. indexOfComponent(Component component)Returns the index of the tab for the specified component.intJTabbedPane. indexOfTabComponent(Component tabComponent)Returns the index of the tab for the specified tab component.voidJPopupMenu. insert(Component component, int index)Inserts the specified component into the menu at a given position.voidJTextPane. insertComponent(Component c)Inserts a component into the document as a replacement for the currently selected content.voidJTabbedPane. insertTab(String title, Icon icon, Component component, String tip, int index)Inserts a new tab for the given component, at the given index, represented by the given title and/or icon, either of which may benull.booleanMenuSelectionManager. isComponentPartOfCurrentMenu(Component c)Return true ifcis part of the currently used menustatic booleanSwingUtilities. isDescendingFrom(Component a, Component b)Returntrueif a componentadescends from a componentbstatic booleanJComponent. isLightweightComponent(Component c)Returns true if this component is lightweight, that is, if it doesn't have a native window system peer.booleanJMenu. isMenuComponent(Component c)Returns true if the specified component exists in the submenu hierarchy.voidGroupLayout. linkSize(int axis, Component... components)Forces the specified components to have the same size along the specified axis regardless of their preferred, minimum or maximum sizes.voidGroupLayout. linkSize(Component... components)Forces the specified components to have the same size regardless of their preferred, minimum or maximum sizes.voidJLayeredPane. moveToBack(Component c)Moves the component to the bottom of the components in its current layer (position -1).voidJLayeredPane. moveToFront(Component c)Moves the component to the top of the components in its current layer (position 0).voidCellRendererPane. paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)Calls this.paintComponent(g, c, p, x, y, w, h, false).voidCellRendererPane. paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate)Paint a cell renderer component c on graphics object g.voidCellRendererPane. paintComponent(Graphics g, Component c, Container p, Rectangle r)Calls this.paintComponent() with the rectangles x,y,width,height fields.static voidSwingUtilities. paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)Paints a component to the specifiedGraphics.static voidSwingUtilities. paintComponent(Graphics g, Component c, Container p, Rectangle r)Paints a component to the specifiedGraphics.voidIcon. paintIcon(Component c, Graphics g, int x, int y)Draw the icon at the specified location.voidImageIcon. paintIcon(Component c, Graphics g, int x, int y)Paints the icon.voidLookAndFeel. provideErrorFeedback(Component component)Invoked when the user attempts an invalid operation, such as pasting into an uneditableJTextFieldthat has focus.voidSpringLayout. putConstraint(String e1, Component c1, int pad, String e2, Component c2)Links edgee1of componentc1to edgee2of componentc2, with a fixed distance between the edges.voidSpringLayout. putConstraint(String e1, Component c1, Spring s, String e2, Component c2)Links edgee1of componentc1to edgee2of componentc2.voidJApplet. remove(Component comp)Deprecated.Removes the specified component from the container.voidJDialog. remove(Component comp)Removes the specified component from the container.voidJFrame. remove(Component comp)Removes the specified component from the container.voidJInternalFrame. remove(Component comp)Removes the specified component from the container.voidJMenu. remove(Component c)Removes the componentcfrom this menu.voidJSplitPane. remove(Component component)Removes the child component,componentfrom the pane.voidJTabbedPane. remove(Component component)Removes the specifiedComponentfrom theJTabbedPane.voidJViewport. remove(Component child)Removes theViewports one lightweight child.voidJWindow. remove(Component comp)Removes the specified component from the container.voidBoxLayout. removeLayoutComponent(Component comp)Not used by this class.voidGroupLayout. removeLayoutComponent(Component component)Notification that aComponenthas been removed from the parent container.voidJSpinner.DefaultEditor. removeLayoutComponent(Component child)ThisLayoutManagermethod does nothing.voidOverlayLayout. removeLayoutComponent(Component comp)Removes the specified component from the layout.voidScrollPaneLayout. removeLayoutComponent(Component c)Removes the specified component from the layout.voidSpringLayout. removeLayoutComponent(Component c)Removes the constraints associated with the specified component.voidViewportLayout. removeLayoutComponent(Component c)Removes the specified component from the layout.voidGroupLayout. replace(Component existingComponent, Component newComponent)Replaces an existing component with a new one.voidJSplitPane. setBottomComponent(Component comp)Sets the component below, or to the right of the divider.voidJScrollPane. setColumnHeaderView(Component view)Creates a column-header viewport if necessary, sets its view, and then adds the column-header viewport to the scrollpane.voidJTabbedPane. setComponentAt(int index, Component component)Sets the component atindextocomponent.voidJDesktopPane. setComponentZOrder(Component comp, int index)Moves the specified component to the specified z-order index in the container.voidJScrollPane. setCorner(String key, Component corner)Adds a child that will appear in one of the scroll panes corners, if there's room.voidJApplet. setGlassPane(Component glassPane)Deprecated.Sets the glassPane property.voidJDialog. setGlassPane(Component glassPane)Sets theglassPaneproperty.voidJFrame. setGlassPane(Component glassPane)Sets theglassPaneproperty.voidJInternalFrame. setGlassPane(Component glass)Sets thisJInternalFrame'sglassPaneproperty.voidJRootPane. setGlassPane(Component glass)Sets a specifiedComponentto be the glass pane for this root pane.voidJWindow. setGlassPane(Component glassPane)Sets theglassPaneproperty.voidRootPaneContainer. setGlassPane(Component glassPane)The glassPane is always the first child of the rootPane and the rootPanes layout manager ensures that it's always as big as the rootPane.voidGroupLayout. setHonorsVisibility(Component component, Boolean honorsVisibility)Sets whether the component's visibility is considered for sizing and positioning.voidJPopupMenu. setInvoker(Component invoker)Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.voidJLabel. setLabelFor(Component c)Set the component this is labelling.voidJLayeredPane. setLayer(Component c, int layer)Sets the layer attribute on the specified component, making it the bottommost component in that layer.voidJLayeredPane. setLayer(Component c, int layer, int position)Sets the layer attribute for the specified component and also sets its position within that layer.voidJSplitPane. setLeftComponent(Component comp)Sets the component to the left (or above) the divider.voidJComponent. setNextFocusableComponent(Component aComponent)Deprecated.As of 1.4, replaced byFocusTraversalPolicyvoidJLayeredPane. setPosition(Component c, int position)Moves the component topositionwithin its current layer, where 0 is the topmost position within the layer and -1 is the bottommost position.voidJSplitPane. setRightComponent(Component comp)Sets the component to the right (or below) the divider.voidJScrollPane. setRowHeaderView(Component view)Creates a row-header viewport if necessary, sets its view and then adds the row-header viewport to the scrollpane.voidJMenuBar. setSelected(Component sel)Sets the currently selected component, producing a a change to the selection model.voidJPopupMenu. setSelected(Component sel)Sets the currently selected component, This will result in a change to the selection model.voidJTabbedPane. setSelectedComponent(Component c)Sets the selected component for this tabbedpane.voidJTabbedPane. setTabComponentAt(int index, Component component)Sets the component that is responsible for rendering the title for the specified tab.voidJSplitPane. setTopComponent(Component comp)Sets the component above, or to the left of the divider.voidJViewport. setView(Component view)Sets theJViewport's one lightweight child (view), which can benull.voidJScrollPane. setViewportView(Component view)Creates a viewport if necessary and then sets its view.voidJPopupMenu. show(Component invoker, int x, int y)Displays the popup menu at the position x,y in the coordinate space of the component invoker.static intJOptionPane. showConfirmDialog(Component parentComponent, Object message)Brings up a dialog with the options Yes, No and Cancel; with the title, Select an Option.static intJOptionPane. showConfirmDialog(Component parentComponent, Object message, String title, int optionType)Brings up a dialog where the number of choices is determined by theoptionTypeparameter.static intJOptionPane. showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)Brings up a dialog where the number of choices is determined by theoptionTypeparameter, where themessageTypeparameter determines the icon to display.static intJOptionPane. showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)Brings up a dialog with a specified icon, where the number of choices is determined by theoptionTypeparameter.static ColorJColorChooser. showDialog(Component component, String title, Color initialColor)Shows a modal color-chooser dialog and blocks until the dialog is hidden.static ColorJColorChooser. showDialog(Component component, String title, Color initialColor, boolean colorTransparencySelectionEnabled)Shows a modal color-chooser dialog and blocks until the dialog is hidden.intJFileChooser. showDialog(Component parent, String approveButtonText)Pops a custom file chooser dialog with a custom approve button.static StringJOptionPane. showInputDialog(Component parentComponent, Object message)Shows a question-message dialog requesting input from the user parented toparentComponent.static StringJOptionPane. showInputDialog(Component parentComponent, Object message, Object initialSelectionValue)Shows a question-message dialog requesting input from the user and parented toparentComponent.static StringJOptionPane. showInputDialog(Component parentComponent, Object message, String title, int messageType)Shows a dialog requesting input from the user parented toparentComponentwith the dialog having the titletitleand message typemessageType.static ObjectJOptionPane. showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)Prompts the user for input in a blocking dialog where the initial selection, possible selections, and all other options can be specified.static intJOptionPane. showInternalConfirmDialog(Component parentComponent, Object message)Brings up an internal dialog panel with the options Yes, No and Cancel; with the title, Select an Option.static intJOptionPane. showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType)Brings up a internal dialog panel where the number of choices is determined by theoptionTypeparameter.static intJOptionPane. showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)Brings up an internal dialog panel where the number of choices is determined by theoptionTypeparameter, where themessageTypeparameter determines the icon to display.static intJOptionPane. showInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)Brings up an internal dialog panel with a specified icon, where the number of choices is determined by theoptionTypeparameter.static StringJOptionPane. showInternalInputDialog(Component parentComponent, Object message)Shows an internal question-message dialog requesting input from the user parented toparentComponent.static StringJOptionPane. showInternalInputDialog(Component parentComponent, Object message, String title, int messageType)Shows an internal dialog requesting input from the user parented toparentComponentwith the dialog having the titletitleand message typemessageType.static ObjectJOptionPane. showInternalInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)Prompts the user for input in a blocking internal dialog where the initial selection, possible selections, and all other options can be specified.static voidJOptionPane. showInternalMessageDialog(Component parentComponent, Object message)Brings up an internal confirmation dialog panel.static voidJOptionPane. showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType)Brings up an internal dialog panel that displays a message using a default icon determined by themessageTypeparameter.static voidJOptionPane. showInternalMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)Brings up an internal dialog panel displaying a message, specifying all parameters.static intJOptionPane. showInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)Brings up an internal dialog panel with a specified icon, where the initial choice is determined by theinitialValueparameter and the number of choices is determined by theoptionTypeparameter.static voidJOptionPane. showMessageDialog(Component parentComponent, Object message)Brings up an information-message dialog titled "Message".static voidJOptionPane. showMessageDialog(Component parentComponent, Object message, String title, int messageType)Brings up a dialog that displays a message using a default icon determined by themessageTypeparameter.static voidJOptionPane. showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)Brings up a dialog displaying a message, specifying all parameters.intJFileChooser. showOpenDialog(Component parent)Pops up an "Open File" file chooser dialog.static intJOptionPane. showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)Brings up a dialog with a specified icon, where the initial choice is determined by theinitialValueparameter and the number of choices is determined by theoptionTypeparameter.intJFileChooser. showSaveDialog(Component parent)Pops up a "Save File" file chooser dialog.static voidSwingUtilities. updateComponentTreeUI(Component c)A simple minded look and feel change: ask each node in the tree toupdateUI()-- that is, to initialize its UI property with the current look and feel.static SpringSpring. width(Component c)Returns a spring whose minimum, preferred, maximum and value properties are defined by the widths of the minimumSize, preferredSize, maximumSize and size properties of the supplied component.static WindowSwingUtilities. windowForComponent(Component c)Returns the firstWindowancestor ofc, ornullifcis not contained inside aWindow.Method parameters in javax.swing with type arguments of type Component Modifier and Type Method Description protected voidSortingFocusTraversalPolicy. setComparator(Comparator<? super Component> comparator)Sets the Comparator which will be used to sort the Components in a focus traversal cycle.Constructors in javax.swing with parameters of type Component Constructor Description Constraints(Component c)Creates aConstraintsobject with suitablex,y,widthandheightsprings for component,c.JScrollPane(Component view)Creates aJScrollPanethat displays the contents of the specified component, where both horizontal and vertical scrollbars appear whenever the component's contents are larger than the view.JScrollPane(Component view, int vsbPolicy, int hsbPolicy)Creates aJScrollPanethat displays the view component in a viewport whose view position can be controlled with a pair of scrollbars.JSplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent)Creates a newJSplitPanewith the specified orientation and redrawing style, and with the specified components.JSplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent)Creates a newJSplitPanewith the specified orientation and the specified components.Popup(Component owner, Component contents, int x, int y)Creates aPopupfor the Componentownercontaining the Componentcontents.ProgressMonitor(Component parentComponent, Object message, String note, int min, int max)Constructs a graphic object that shows progress, typically by filling in a rectangular bar as the process nears completion.ProgressMonitorInputStream(Component parentComponent, Object message, InputStream in)Constructs an object to monitor the progress of an input stream.TransferSupport(Component component, Transferable transferable)Create aTransferSupportwithisDrop()falsefor the given component andTransferable.Constructor parameters in javax.swing with type arguments of type Component Constructor Description SortingFocusTraversalPolicy(Comparator<? super Component> comparator)Constructs a SortingFocusTraversalPolicy with the specified Comparator. -
Uses of Component in javax.swing.border
Methods in javax.swing.border with parameters of type Component Modifier and Type Method Description intAbstractBorder. getBaseline(Component c, int width, int height)Returns the baseline.intTitledBorder. getBaseline(Component c, int width, int height)Returns the baseline.Component.BaselineResizeBehaviorAbstractBorder. getBaselineResizeBehavior(Component c)Returns an enum indicating how the baseline of a component changes as the size changes.Component.BaselineResizeBehaviorTitledBorder. getBaselineResizeBehavior(Component c)Returns an enum indicating how the baseline of the border changes as the size changes.InsetsAbstractBorder. getBorderInsets(Component c)This default implementation returns a newInsetsobject that is initialized by theAbstractBorder.getBorderInsets(Component,Insets)method.InsetsAbstractBorder. getBorderInsets(Component c, Insets insets)Reinitializes the insets parameter with this Border's current Insets.InsetsBevelBorder. getBorderInsets(Component c, Insets insets)Reinitialize the insets parameter with this Border's current Insets.InsetsBorder. getBorderInsets(Component c)Returns the insets of the border.InsetsCompoundBorder. getBorderInsets(Component c, Insets insets)Reinitialize the insets parameter with this Border's current Insets.InsetsEmptyBorder. getBorderInsets(Component c, Insets insets)Reinitialize the insets parameter with this Border's current Insets.InsetsEtchedBorder. getBorderInsets(Component c, Insets insets)Reinitialize the insets parameter with this Border's current Insets.InsetsLineBorder. getBorderInsets(Component c, Insets insets)Reinitialize the insets parameter with this Border's current Insets.InsetsMatteBorder. getBorderInsets(Component c, Insets insets)Reinitialize the insets parameter with this Border's current Insets.InsetsSoftBevelBorder. getBorderInsets(Component c, Insets insets)Reinitialize the insets parameter with this Border's current Insets.InsetsStrokeBorder. getBorderInsets(Component c, Insets insets)Reinitializes theinsetsparameter with this border's current insets.InsetsTitledBorder. getBorderInsets(Component c, Insets insets)Reinitialize the insets parameter with this Border's current Insets.protected FontTitledBorder. getFont(Component c)Returns default font of the titled border.ColorEtchedBorder. getHighlightColor(Component c)Returns the highlight color of the etched border when rendered on the specified component.ColorBevelBorder. getHighlightInnerColor(Component c)Returns the inner highlight color of the bevel border when rendered on the specified component.ColorBevelBorder. getHighlightOuterColor(Component c)Returns the outer highlight color of the bevel border when rendered on the specified component.RectangleAbstractBorder. getInteriorRectangle(Component c, int x, int y, int width, int height)This convenience method calls the static method.static RectangleAbstractBorder. getInteriorRectangle(Component c, Border b, int x, int y, int width, int height)Returns a rectangle using the arguments minus the insets of the border.DimensionTitledBorder. getMinimumSize(Component c)Returns the minimum dimensions this border requires in order to fully display the border and title.ColorEtchedBorder. getShadowColor(Component c)Returns the shadow color of the etched border when rendered on the specified component.ColorBevelBorder. getShadowInnerColor(Component c)Returns the inner shadow color of the bevel border when rendered on the specified component.ColorBevelBorder. getShadowOuterColor(Component c)Returns the outer shadow color of the bevel border when rendered on the specified component.voidAbstractBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)This default implementation does no painting.voidBevelBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)Paints the border for the specified component with the specified position and size.voidBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)Paints the border for the specified component with the specified position and size.voidCompoundBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)Paints the compound border by painting the outside border with the specified position and size and then painting the inside border at the specified position and size offset by the insets of the outside border.voidEmptyBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)Does no drawing by default.voidEtchedBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)Paints the border for the specified component with the specified position and size.voidLineBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)Paints the border for the specified component with the specified position and size.voidMatteBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)Paints the matte border.voidSoftBevelBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)Paints the border for the specified component with the specified position and size.voidStrokeBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)Paints the border for the specified component with the specified position and size.voidTitledBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)Paints the border for the specified component with the specified position and size.protected voidBevelBorder. paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height)Paints a lowered bevel for the specified component with the specified position and size.protected voidBevelBorder. paintRaisedBevel(Component c, Graphics g, int x, int y, int width, int height)Paints a raised bevel for the specified component with the specified position and size. -
Uses of Component in javax.swing.colorchooser
Subclasses of Component in javax.swing.colorchooser Modifier and Type Class Description classAbstractColorChooserPanelThis is the abstract superclass for color choosers. -
Uses of Component in javax.swing.event
Constructors in javax.swing.event with parameters of type Component Constructor Description MenuDragMouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, MenuElement[] p, MenuSelectionManager m)Constructs a MenuDragMouseEvent object.MenuDragMouseEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, MenuElement[] p, MenuSelectionManager m)Constructs a MenuDragMouseEvent object.MenuKeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, MenuElement[] p, MenuSelectionManager m)Constructs a MenuKeyEvent object. -
Uses of Component in javax.swing.plaf
Classes in javax.swing.plaf with type parameters of type Component Modifier and Type Class Description classLayerUI<V extends Component>The base class for allJLayer's UI delegates. -
Uses of Component in javax.swing.plaf.basic
Subclasses of Component in javax.swing.plaf.basic Modifier and Type Class Description classBasicArrowButtonJButton object that draws a scaled Arrow in one of the cardinal directions.classBasicComboBoxRendererComboBox rendererstatic classBasicComboBoxRenderer.UIResourceA subclass of BasicComboBoxRenderer that implements UIResource.classBasicComboPopupThis is a basic implementation of theComboPopupinterface.classBasicInternalFrameTitlePaneThe class that manages a basic title barclassBasicInternalFrameTitlePane.SystemMenuBarThis class should be treated as a "protected" inner class.classBasicSplitPaneDividerDivider used by BasicSplitPaneUI.protected classBasicToolBarUI.DragWindowThe window which appears during dragging theJToolBar.Fields in javax.swing.plaf.basic declared as Component Modifier and Type Field Description protected Component[]BasicSplitPaneUI.BasicHorizontalLayoutManager. componentsThe components.protected ComponentBasicTreeUI.MouseInputHandler. destinationDestination that receives all events.protected ComponentBasicTreeUI. editingComponentWhen editing, this will be the Component that is doing the actual editing.protected ComponentBasicComboBoxUI. editorThe Component that the @{code ComboBoxEditor} uses for editing.protected ComponentBasicSplitPaneDivider. hiddenDividerDivider that is used for noncontinuous layout mode.protected ComponentBasicOptionPaneUI. initialFocusComponentComponent to receive focus when messaged with selectInitialValue.protected ComponentBasicSplitPaneUI. nonContinuousLayoutDividerInstance for the shadow of the divider when non continuous layout is being used.protected ComponentBasicTreeUI.MouseInputHandler. sourceSource that events are coming from.ComponentBasicMenuUI.ChangeHandler. wasFocusedThe component that was focused.Methods in javax.swing.plaf.basic that return Component Modifier and Type Method Description protected ComponentBasicSplitPaneUI. createDefaultNonContinuousLayoutDivider()Returns the default non continuous layout divider, which is an instance ofCanvasthat fills in the background with dark gray.protected ComponentBasicSpinnerUI. createNextButton()Creates an increment button, i.e. component that replaces the spinner value with the object returned byspinner.getNextValue.protected ComponentBasicSpinnerUI. createPreviousButton()Creates a decrement button, i.e. component that replaces the spinner value with the object returned byspinner.getPreviousValue.protected ComponentBasicSliderUI. getHighestValueLabel()Returns the label that corresponds to the lowest slider value in the label table.protected ComponentBasicSliderUI. getLowestValueLabel()Returns the label that corresponds to the highest slider value in the label table.ComponentBasicSplitPaneUI. getNonContinuousLayoutDivider()Returns the divider to use when theJSplitPaneis configured to not continuously layout.protected ComponentBasicTabbedPaneUI. getVisibleComponent()Returns the visible component.Methods in javax.swing.plaf.basic with parameters of type Component Modifier and Type Method Description voidBasicSplitPaneUI.BasicHorizontalLayoutManager. addLayoutComponent(Component comp, Object constraints)Adds the specified component to the layout, using the specified constraint object.voidBasicSplitPaneUI.BasicHorizontalLayoutManager. addLayoutComponent(String place, Component component)Adds the component at place.booleanBasicToolBarUI. canDock(Component c, Point p)Returnstrueif theJToolBarcan dock at the given position.protected voidBasicTreeUI. drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)Draws theiconcentered at (x,y).protected intBasicSplitPaneUI.BasicHorizontalLayoutManager. getPreferredSizeOfComponent(Component c)Returns the width of the passed in Components preferred size.protected DimensionBasicComboBoxUI. getSizeForComponent(Component comp)Returns the size a component would have if used as a cell renderer.protected intBasicSplitPaneUI.BasicHorizontalLayoutManager. getSizeOfComponent(Component c)Returns the width of the passed in component.protected voidBasicSpinnerUI. installNextButtonListeners(Component c)Installs the necessary listeners on the next button,c, to update theJSpinnerin response to a user gesture.protected voidBasicSpinnerUI. installPreviousButtonListeners(Component c)Installs the necessary listeners on the previous button,c, to update theJSpinnerin response to a user gesture.protected voidBasicSliderUI. paintHorizontalLabel(Graphics g, int value, Component label)Called for every label in the label table.protected voidBasicSliderUI. paintVerticalLabel(Graphics g, int value, Component label)Called for every label in the label table.voidBasicSplitPaneUI.BasicHorizontalLayoutManager. removeLayoutComponent(Component component)Removes the specified component from our knowledge.protected voidBasicToolBarUI. setBorderToNonRollover(Component c)Sets the border of the component to have a non-rollover border which was created by theBasicToolBarUI.createNonRolloverBorder()method.protected voidBasicToolBarUI. setBorderToNormal(Component c)Sets the border of the component to have a normal border.protected voidBasicToolBarUI. setBorderToRollover(Component c)Sets the border of the component to have a rollover border which was created by theBasicToolBarUI.createRolloverBorder()method.protected voidBasicSplitPaneUI.BasicHorizontalLayoutManager. setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize)Sets the width of the componentcto besize, placing its x location atlocation, y to theinsets.topand height to thecontainerSize.heightless the top and bottom insets.protected voidBasicSplitPaneUI. setNonContinuousLayoutDivider(Component newDivider)Sets the divider to use when theJSplitPaneis configured to not continuously layout.protected voidBasicSplitPaneUI. setNonContinuousLayoutDivider(Component newDivider, boolean rememberSizes)Sets the divider to use.protected voidBasicTabbedPaneUI. setVisibleComponent(Component component)Sets the visible component.Constructors in javax.swing.plaf.basic with parameters of type Component Constructor Description MouseInputHandler(Component source, Component destination, MouseEvent event)Constructs a new instance ofMouseInputHandler. -
Uses of Component in javax.swing.plaf.metal
Subclasses of Component in javax.swing.plaf.metal Modifier and Type Class Description classMetalComboBoxButtonJButton subclass to help out MetalComboBoxUIclassMetalComboBoxUI.MetalComboPopupDeprecated.As of Java 2 platform v1.4.protected classMetalFileChooserUI.FileRendererDeprecated.As of JDK version 9.classMetalFileChooserUI.FilterComboBoxRendererRender different type sizes and styles.classMetalInternalFrameTitlePaneClass that manages a JLF title barclassMetalScrollButtonJButton object for Metal scrollbar arrows.Methods in javax.swing.plaf.metal with parameters of type Component Modifier and Type Method Description protected voidMetalCheckBoxIcon. drawCheck(Component c, Graphics g, int x, int y)PaintsMetalCheckBoxIcon.voidMetalComboBoxIcon. paintIcon(Component c, Graphics g, int x, int y)Paints the horizontal bars for thevoidMetalIconFactory.TreeControlIcon. paintMe(Component c, Graphics g, int x, int y)Paints theTreeControlIcon.voidMetalLookAndFeel. provideErrorFeedback(Component component)Invoked when the user attempts an invalid operation, such as pasting into an uneditableJTextFieldthat has focus. -
Uses of Component in javax.swing.plaf.synth
Methods in javax.swing.plaf.synth with parameters of type Component Modifier and Type Method Description protected voidSynthToolBarUI. setBorderToNonRollover(Component c)This implementation does nothing, because therolloverproperty of theJToolBarclass is not used in the Synth Look and Feel.protected voidSynthToolBarUI. setBorderToNormal(Component c)This implementation does nothing, because therolloverproperty of theJToolBarclass is not used in the Synth Look and Feel.protected voidSynthToolBarUI. setBorderToRollover(Component c)This implementation does nothing, because therolloverproperty of theJToolBarclass is not used in the Synth Look and Feel.static voidSynthLookAndFeel. updateStyles(Component c)Updates the style associated withc, and all its children. -
Uses of Component in javax.swing.table
Subclasses of Component in javax.swing.table Modifier and Type Class Description classDefaultTableCellRendererThe standard class for rendering (displaying) individual cells in aJTable.static classDefaultTableCellRenderer.UIResourceA subclass ofDefaultTableCellRendererthat implementsUIResource.classJTableHeaderThis is the object which manages the header of theJTable.Methods in javax.swing.table that return Component Modifier and Type Method Description ComponentTableCellEditor. getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)Sets an initialvaluefor the editor.ComponentDefaultTableCellRenderer. getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)Returns the default table cell renderer.ComponentTableCellRenderer. getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)Returns the component used for drawing the cell. -
Uses of Component in javax.swing.text
Subclasses of Component in javax.swing.text Modifier and Type Class Description classJTextComponentJTextComponentis the base class for swing text components.Methods in javax.swing.text that return Component Modifier and Type Method Description protected ComponentComponentView. createComponent()Create the component that is associated with this view.ComponentComponentView. getComponent()Fetch the component associated with the view.static ComponentStyleConstants. getComponent(AttributeSet a)Gets the component setting from the attribute list.Methods in javax.swing.text with parameters of type Component Modifier and Type Method Description protected voidPlainView. damageLineRange(int line0, int line1, Shape a, Component host)Repaint the given line range.static voidStyleConstants. setComponent(MutableAttributeSet a, Component c)Sets the component attribute. -
Uses of Component in javax.swing.text.html
Methods in javax.swing.text.html that return Component Modifier and Type Method Description protected ComponentFormView. createComponent()Create the component.protected ComponentObjectView. createComponent()Create the component. -
Uses of Component in javax.swing.tree
Subclasses of Component in javax.swing.tree Modifier and Type Class Description classDefaultTreeCellEditor.DefaultTextFieldTextFieldused when no editor is supplied.classDefaultTreeCellEditor.EditorContainerContainer responsible for placing theeditingComponent.classDefaultTreeCellRendererDisplays an entry in a tree.Fields in javax.swing.tree declared as Component Modifier and Type Field Description protected ComponentDefaultTreeCellEditor. editingComponentComponent used in editing, obtained from theeditingContainer.Methods in javax.swing.tree that return Component Modifier and Type Method Description ComponentDefaultTreeCellEditor. getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)Configures the editor.ComponentTreeCellEditor. getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)Sets an initial value for the editor.ComponentDefaultTreeCellRenderer. getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)Configures the renderer based on the passed in components.ComponentTreeCellRenderer. getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)Sets the value of the current tree cell tovalue.
-