Uses of Class
javax.swing.JComponent

Packages that use JComponent
Package
Description
Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
Contains classes and interfaces used by the JColorChooser component.
Provides for events fired by Swing components.
Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.
Provides user interface objects built according to the Basic look and feel.
Provides user interface objects built according to the Java look and feel (once codenamed Metal), which is the default look and feel.
Provides user interface objects that combine two or more look and feels.
Provides user interface objects built according to the cross-platform Nimbus look and feel.
Synth is a skinnable look and feel in which all painting is delegated.
Provides classes and interfaces for dealing with javax.swing.JTable.
Provides classes and interfaces that deal with editable and noneditable text components.
Provides classes and interfaces for dealing with javax.swing.JTree.
  • Uses of JComponent in javax.swing

    Subclasses of JComponent in javax.swing
    Modifier and Type
    Class
    Description
    class 
    Defines common behaviors for buttons and menu items.
    class 
    A lightweight container that uses a BoxLayout object as its layout manager.
    static class 
    An implementation of a lightweight component that participates in layout but has no view.
    class 
    Renders an item in a list.
    static class 
    A subclass of DefaultListCellRenderer that implements UIResource.
    class 
    An implementation of a "push" button.
    class 
    An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
    class 
    A menu item that can be selected or deselected.
    class 
    JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
    class 
    A component that combines a button or editable field and a drop-down list.
    class 
    A container used to create a multiple-document interface or a virtual desktop.
    class 
    A text component to edit various kinds of content.
    class 
    JFileChooser provides a simple mechanism for the user to choose a file.
    class 
    JFormattedTextField extends JTextField adding support for formatting arbitrary values, as well as retrieving a particular object once the user has edited the text.
    class 
    A 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 class 
    This component represents an iconified version of a JInternalFrame.
    class 
    A display area for a short text string or an image, or both.
    final class 
    JLayer<V extends Component>
    JLayer is a universal decorator for Swing components which enables you to implement various advanced painting effects as well as receive notifications of all AWTEvents generated within its borders.
    class 
    JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
    class 
    A component that displays a list of objects and allows the user to select one or more items.
    class 
    An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
    class 
    An implementation of a menu bar.
    class 
    An implementation of an item in a menu.
    class 
    JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
    class 
    JPanel is a generic lightweight container.
    class 
    JPasswordField is 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.
    class 
    An implementation of a popup menu -- a small window that pops up and displays a series of choices.
    static class 
    A popup menu-specific separator.
    class 
    A component that visually displays the progress of some task.
    class 
    An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
    class 
    An implementation of a radio button menu item.
    class 
    A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
    class 
    An implementation of a scrollbar.
    class 
    Provides a scrollable view of a lightweight component.
    protected class 
    By default JScrollPane creates scrollbars that are instances of this class.
    class 
    JSeparator provides a general purpose component for implementing divider lines - most commonly used as a divider between menu items that breaks them up into logical groupings.
    class 
    A component that lets the user graphically select a value by sliding a knob within a bounded interval.
    class 
    A single line input field that lets the user select a number or an object value from an ordered sequence.
    static class 
    An editor for a JSpinner whose model is a SpinnerDateModel.
    static class 
    A simple base class for more specialized editors that displays a read-only view of the model's current value with a JFormattedTextField.
    static class 
    An editor for a JSpinner whose model is a SpinnerListModel.
    static class 
    An editor for a JSpinner whose model is a SpinnerNumberModel.
    class 
    JSplitPane is used to divide two (and only two) Components.
    class 
    A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
    class 
    The JTable is used to display and edit regular two-dimensional tables of cells.
    class 
    A JTextArea is a multi-line area that displays plain text.
    class 
    JTextField is a lightweight component that allows the editing of a single line of text.
    class 
    A text component that can be marked up with attributes that are represented graphically.
    class 
    An implementation of a two-state button.
    class 
    JToolBar provides a component that is useful for displaying commonly used Actions or controls.
    static class 
    A toolbar-specific separator.
    class 
    Used to display a "Tip" for a Component.
    class 
    A control that displays a set of hierarchical data as an outline.
    class 
    The "viewport" or "porthole" through which you see the underlying information.
    Fields in javax.swing declared as JComponent
    Modifier and Type
    Field
    Description
    protected JComponent
    DefaultCellEditor.editorComponent
    The Swing component being edited.
    Methods in javax.swing that return JComponent
    Modifier and Type
    Method
    Description
    protected JComponent
    JSpinner.createEditor(SpinnerModel model)
    This method is called by the constructors to create the JComponent that displays the current value of the sequence.
    JFileChooser.getAccessory()
    Returns the accessory component.
    ComponentInputMap.getComponent()
    Returns the component the InputMap was created for.
    JToolTip.getComponent()
    Returns the component the tooltip applies to.
    JSpinner.getEditor()
    Returns the component that displays and potentially changes the model's value.
    JColorChooser.getPreviewPanel()
    Returns the preview panel that shows a chosen color.
    Methods in javax.swing that return types with arguments of type JComponent
    Modifier and Type
    Method
    Description
    JSlider.createStandardLabels(int increment)
    Creates a Hashtable of numerical text labels, starting at the slider minimum, and using the increment specified.
    JSlider.createStandardLabels(int increment, int start)
    Creates a Hashtable of numerical text labels, starting at the starting point specified, and using the increment specified.
    Methods in javax.swing with parameters of type JComponent
    Modifier and Type
    Method
    Description
    void
    RepaintManager.addDirtyRegion(JComponent c, int x, int y, int w, int h)
    Add a component in the list of components that should be refreshed.
    void
    RepaintManager.addInvalidComponent(JComponent invalidComponent)
    Mark the component as in need of layout and queue a runnable for the event dispatching thread that will validate the components first isValidateRoot() ancestor.
    GroupLayout.SequentialGroup.addPreferredGap(JComponent comp1, JComponent comp2, LayoutStyle.ComponentPlacement type)
    Adds an element representing the preferred gap between two components.
    GroupLayout.SequentialGroup.addPreferredGap(JComponent comp1, JComponent comp2, LayoutStyle.ComponentPlacement type, int pref, int max)
    Adds an element representing the preferred gap between two components.
    void
    DefaultDesktopManager.beginDraggingFrame(JComponent f)
     
    void
    DesktopManager.beginDraggingFrame(JComponent f)
    This method is normally called when the user has indicated that they will begin dragging a component around.
    void
    DefaultDesktopManager.beginResizingFrame(JComponent f, int direction)
     
    void
    DesktopManager.beginResizingFrame(JComponent f, int direction)
    This method is normally called when the user has indicated that they will begin resizing the frame.
    static Rectangle
    SwingUtilities.calculateInnerArea(JComponent c, Rectangle r)
    Stores the position and size of the inner painting area of the specified component in r and returns r.
    boolean
    TransferHandler.canImport(JComponent comp, DataFlavor[] transferFlavors)
    Indicates whether a component will accept an import of the given set of data flavors prior to actually attempting to import it.
    protected Transferable
    TransferHandler.createTransferable(JComponent c)
    Creates a Transferable to use as the source for a data transfer.
    RepaintManager.currentManager(JComponent c)
    Return the RepaintManager for the calling thread given a JComponent.
    void
    DefaultDesktopManager.dragFrame(JComponent f, int newX, int newY)
    Moves the visible location of the frame being dragged to the location specified.
    void
    DesktopManager.dragFrame(JComponent f, int newX, int newY)
    The user has moved the frame.
    void
    DefaultDesktopManager.endDraggingFrame(JComponent f)
     
    void
    DesktopManager.endDraggingFrame(JComponent f)
    This method signals the end of the dragging session.
    void
    DefaultDesktopManager.endResizingFrame(JComponent f)
     
    void
    DesktopManager.endResizingFrame(JComponent f)
    This method signals the end of the resize session.
    void
    TransferHandler.exportAsDrag(JComponent comp, InputEvent e, int action)
    Causes the Swing drag support to be initiated.
    protected void
    TransferHandler.exportDone(JComponent source, Transferable data, int action)
    Invoked after data has been exported.
    void
    TransferHandler.exportToClipboard(JComponent comp, Clipboard clip, int action)
    Causes a transfer from the given component to the given clipboard.
    abstract int
    LayoutStyle.getContainerGap(JComponent component, int position, Container parent)
    Returns the amount of space to place between the component and specified edge of its parent.
    RepaintManager.getDirtyRegion(JComponent aComponent)
    Return the current dirty region for a component.
    LookAndFeel.getDisabledIcon(JComponent component, Icon icon)
    Returns an Icon with a disabled appearance.
    LookAndFeel.getDisabledSelectedIcon(JComponent component, Icon icon)
    Returns an Icon for use by disabled components that are also selected.
    static int
    JLayeredPane.getLayer(JComponent c)
    Gets the layer property for a JComponent, it does not cause any side effects like setLayer().
    abstract int
    LayoutStyle.getPreferredGap(JComponent component1, JComponent component2, LayoutStyle.ComponentPlacement type, int position, Container parent)
    Returns the amount of space to use between two components.
    int
    TransferHandler.getSourceActions(JComponent c)
    Returns the type of transfer actions supported by the source; any bitwise-OR combination of COPY, MOVE and LINK.
    UIDefaults.getUI(JComponent target)
    Creates an ComponentUI implementation for the specified component.
    UIManager.getUI(JComponent target)
    Returns the appropriate ComponentUI implementation for target.
    static ActionMap
    SwingUtilities.getUIActionMap(JComponent component)
    Returns the ActionMap provided by the UI in component component.
    static InputMap
    SwingUtilities.getUIInputMap(JComponent component, int condition)
    Returns the InputMap provided by the UI for condition condition in component component.
    boolean
    TransferHandler.importData(JComponent comp, Transferable t)
    Causes a transfer to a component from a clipboard or a DND drop operation.
    static void
    LookAndFeel.installBorder(JComponent c, String defaultBorderName)
    Convenience method for setting a component's border property with a value from the defaults.
    static void
    LookAndFeel.installColors(JComponent c, String defaultBgName, String defaultFgName)
    Convenience method for setting a component's foreground and background color properties with values from the defaults.
    static void