Package javax.swing

Interface Summary
Action sample code for javax.swing.Action definition code for javax.swing.Action The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.
BoundedRangeModel sample code for javax.swing.BoundedRangeModel definition code for javax.swing.BoundedRangeModel Defines the data model used by components like Sliders and ProgressBars.
ButtonModel sample code for javax.swing.ButtonModel definition code for javax.swing.ButtonModel State Model for buttons.
CellEditor sample code for javax.swing.CellEditor definition code for javax.swing.CellEditor This interface defines the methods any general editor should be able to implement.
ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor The editor component used for JComboBox components.
ComboBoxModel sample code for javax.swing.ComboBoxModel definition code for javax.swing.ComboBoxModel A data model for a combo box.
DesktopManager sample code for javax.swing.DesktopManager definition code for javax.swing.DesktopManager DesktopManager objects are owned by a JDesktopPane object.
Icon sample code for javax.swing.Icon definition code for javax.swing.Icon A small fixed size picture, typically used to decorate components.
JComboBox.KeySelectionManager sample code for javax.swing.JComboBox.KeySelectionManager definition code for javax.swing.JComboBox.KeySelectionManager The interface that defines a KeySelectionManager.
ListCellRenderer sample code for javax.swing.ListCellRenderer definition code for javax.swing.ListCellRenderer Identifies components that can be used as "rubber stamps" to paint the cells in a JList.
ListModel sample code for javax.swing.ListModel definition code for javax.swing.ListModel This interface defines the methods components like JList use to get the value of each cell in a list and the length of the list.
ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel This interface represents the current state of the selection for any of the components that display a list of values with stable indices.
MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement Any component that can be placed into a menu should implement this interface.
MutableComboBoxModel sample code for javax.swing.MutableComboBoxModel definition code for javax.swing.MutableComboBoxModel A mutable version of ComboBoxModel.
Renderer sample code for javax.swing.Renderer definition code for javax.swing.Renderer Defines the requirements for an object responsible for "rendering" (displaying) a value.
RootPaneContainer sample code for javax.swing.RootPaneContainer definition code for javax.swing.RootPaneContainer This interface is implemented by components that have a single JRootPane child: JDialog, JFrame, JWindow, JApplet, JInternalFrame.
Scrollable sample code for javax.swing.Scrollable definition code for javax.swing.Scrollable An interface that provides information to a scrolling container like JScrollPane.
ScrollPaneConstants sample code for javax.swing.ScrollPaneConstants definition code for javax.swing.ScrollPaneConstants Constants used with the JScrollPane component.
SingleSelectionModel sample code for javax.swing.SingleSelectionModel definition code for javax.swing.SingleSelectionModel A model that supports at most one indexed selection.
SpinnerModel sample code for javax.swing.SpinnerModel definition code for javax.swing.SpinnerModel A model for a potentially unbounded sequence of object values.
SwingConstants sample code for javax.swing.SwingConstants definition code for javax.swing.SwingConstants A collection of constants generally used for positioning and orienting components on the screen.
UIDefaults.ActiveValue sample code for javax.swing.UIDefaults.ActiveValue definition code for javax.swing.UIDefaults.ActiveValue This class enables one to store an entry in the defaults table that's constructed each time it's looked up with one of the getXXX(key) methods.
UIDefaults.LazyValue sample code for javax.swing.UIDefaults.LazyValue definition code for javax.swing.UIDefaults.LazyValue This class enables one to store an entry in the defaults table that isn't constructed until the first time it's looked up with one of the getXXX(key) methods.
WindowConstants sample code for javax.swing.WindowConstants definition code for javax.swing.WindowConstants Constants used to control the window-closing operation.

Class Summary
AbstractAction sample code for javax.swing.AbstractAction definition code for javax.swing.AbstractAction This class provides default implementations for the JFC Action interface.
AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton Defines common behaviors for buttons and menu items.
AbstractCellEditor sample code for javax.swing.AbstractCellEditor definition code for javax.swing.AbstractCellEditor  
AbstractListModel sample code for javax.swing.AbstractListModel definition code for javax.swing.AbstractListModel The abstract definition for the data model that provides a List with its contents.
AbstractSpinnerModel sample code for javax.swing.AbstractSpinnerModel definition code for javax.swing.AbstractSpinnerModel This class provides the ChangeListener part of the SpinnerModel interface that should be suitable for most concrete SpinnerModel implementations.
ActionMap sample code for javax.swing.ActionMap definition code for javax.swing.ActionMap ActionMap provides mappings from Objects (called keys or Action names) to Actions.
BorderFactory sample code for javax.swing.BorderFactory definition code for javax.swing.BorderFactory Factory class for vending standard Border objects.
Box sample code for javax.swing.Box definition code for javax.swing.Box A lightweight container that uses a BoxLayout object as its layout manager.
Box.Filler sample code for javax.swing.Box.Filler definition code for javax.swing.Box.Filler An implementation of a lightweight component that participates in layout but has no view.
BoxLayout sample code for javax.swing.BoxLayout definition code for javax.swing.BoxLayout A layout manager that allows multiple components to be laid out either vertically or horizontally.
ButtonGroup sample code for javax.swing.ButtonGroup definition code for javax.swing.ButtonGroup This class is used to create a multiple-exclusion scope for a set of buttons.
CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane This class is inserted in between cell renderers and the components that use them.
ComponentInputMap sample code for javax.swing.ComponentInputMap definition code for javax.swing.ComponentInputMap A ComponentInputMap is an InputMap associated with a particular JComponent.
DebugGraphics sample code for javax.swing.DebugGraphics definition code for javax.swing.DebugGraphics Graphics subclass supporting graphics debugging.
DefaultBoundedRangeModel sample code for javax.swing.DefaultBoundedRangeModel definition code for javax.swing.DefaultBoundedRangeModel A generic implementation of BoundedRangeModel.
DefaultButtonModel sample code for javax.swing.DefaultButtonModel definition code for javax.swing.DefaultButtonModel The default implementation of a Button component's data model.
DefaultCellEditor sample code for javax.swing.DefaultCellEditor definition code for javax.swing.DefaultCellEditor The default editor for table and tree cells.
DefaultComboBoxModel sample code for javax.swing.DefaultComboBoxModel definition code for javax.swing.DefaultComboBoxModel The default model for combo boxes.
DefaultDesktopManager sample code for javax.swing.DefaultDesktopManager definition code for javax.swing.DefaultDesktopManager This is an implementation of the DesktopManager.
DefaultFocusManager sample code for javax.swing.DefaultFocusManager definition code for javax.swing.DefaultFocusManager This class has been obsoleted by the 1.4 focus APIs.
DefaultListCellRenderer sample code for javax.swing.DefaultListCellRenderer definition code for javax.swing.DefaultListCellRenderer Renders an item in a list.
DefaultListCellRenderer.UIResource sample code for javax.swing.DefaultListCellRenderer.UIResource definition code for javax.swing.DefaultListCellRenderer.UIResource A subclass of DefaultListCellRenderer that implements UIResource.
DefaultListModel sample code for javax.swing.DefaultListModel definition code for javax.swing.DefaultListModel This class loosely implements the java.util.Vector API, in that it implements the 1.1.x version of java.util.Vector, has no collection class support, and notifies the ListDataListeners when changes occur.
DefaultListSelectionModel sample code for javax.swing.DefaultListSelectionModel definition code for javax.swing.DefaultListSelectionModel Default data model for list selections.
DefaultSingleSelectionModel sample code for javax.swing.DefaultSingleSelectionModel definition code for javax.swing.DefaultSingleSelectionModel A generic implementation of SingleSelectionModel.
FocusManager sample code for javax.swing.FocusManager definition code for javax.swing.FocusManager This class has been obsoleted by the 1.4 focus APIs.
GrayFilter sample code for javax.swing.GrayFilter definition code for javax.swing.GrayFilter An image filter that "disables" an image by turning it into a grayscale image, and brightening the pixels in the image.
ImageIcon sample code for javax.swing.ImageIcon definition code for javax.swing.ImageIcon An implementation of the Icon interface that paints Icons from Images.
InputMap sample code for javax.swing.InputMap definition code for javax.swing.InputMap InputMap provides a binding between an input event (currently only KeyStrokes are used) and an Object.
InputVerifier sample code for javax.swing.InputVerifier definition code for javax.swing.InputVerifier The purpose of this class is to help clients support smooth focus navigation through GUIs with text fields.
InternalFrameFocusTraversalPolicy sample code for javax.swing.InternalFrameFocusTraversalPolicy definition code for javax.swing.InternalFrameFocusTraversalPolicy A FocusTraversalPolicy which can optionally provide an algorithm for determining a JInternalFrame's initial Component.
JApplet sample code for javax.swing.JApplet definition code for javax.swing.JApplet An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture.
JButton sample code for javax.swing.JButton definition code for javax.swing.JButton An implementation of a "push" button.
JCheckBox sample code for javax.swing.JCheckBox definition code for javax.swing.JCheckBox An implementation of a check box -- an item that can be selected or deselected, and which displays its state to the user.
JCheckBoxMenuItem sample code for javax.swing.JCheckBoxMenuItem definition code for javax.swing.JCheckBoxMenuItem A menu item that can be selected or deselected.
JColorChooser sample code for javax.swing.JColorChooser definition code for javax.swing.JColorChooser JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox A component that combines a button or editable field and a drop-down list.
JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent The base class for all Swing components except top-level containers.
JDesktopPane sample code for javax.swing.JDesktopPane definition code for javax.swing.JDesktopPane A container used to create a multiple-document interface or a virtual desktop.
JDialog sample code for javax.swing.JDialog definition code for javax.swing.JDialog The main class for creating a dialog window.
JEditorPane sample code for javax.swing.JEditorPane definition code for javax.swing.JEditorPane A text component to edit various kinds of content.
JFileChooser sample code for javax.swing.JFileChooser definition code for javax.swing.JFileChooser JFileChooser provides a simple mechanism for the user to choose a file.
JFormattedTextField sample code for javax.swing.JFormattedTextField definition code for javax.swing.JFormattedTextField JFormattedTextField extends JTextField adding support for formatting arbitrary values, as well as retrieving a particular object once the user has edited the text.
JFormattedTextField.AbstractFormatter sample code for javax.swing.JFormattedTextField.AbstractFormatter definition code for javax.swing.JFormattedTextField.AbstractFormatter Instances of AbstractFormatter are used by JFormattedTextField to handle the conversion both from an Object to a String, and back from a String to an Object.
JFormattedTextField.AbstractFormatterFactory sample code for javax.swing.JFormattedTextField.AbstractFormatterFactory definition code for javax.swing.JFormattedTextField.AbstractFormatterFactory Instances of AbstractFormatterFactory are used by JFormattedTextField to obtain instances of AbstractFormatter which in turn are used to format values.
JFrame sample code for javax.swing.JFrame definition code for javax.swing.JFrame An extended version of java.awt.Frame that adds support for the JFC/Swing component architecture.
JInternalFrame sample code for javax.swing.JInternalFrame definition code for javax.swing.JInternalFrame 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.
JInternalFrame.JDesktopIcon sample code for javax.swing.JInternalFrame.JDesktopIcon definition code for javax.swing.JInternalFrame.JDesktopIcon This component represents an iconified version of a JInternalFrame.
JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel A display area for a short text string or an image, or both.
JLayeredPane sample code for javax.swing.JLayeredPane definition code for javax.swing.JLayeredPane JLayeredPane adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
JList sample code for javax.swing.JList definition code for javax.swing.JList A component that allows the user to select one or more objects from a list.
JMenu sample code for javax.swing.JMenu definition code for javax.swing.JMenu An implementation of a menu -- a popup window containing JMenuItems that is displayed when the user selects an item on the JMenuBar.
JMenuBar sample code for javax.swing.JMenuBar definition code for javax.swing.JMenuBar An implementation of a menu bar.
JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem An implementation of an item in a menu.
JOptionPane sample code for javax.swing.JOptionPane definition code for javax.swing.JOptionPane JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.
JPanel sample code for javax.swing.JPanel definition code for javax.swing.JPanel JPanel is a generic lightweight container.
JPasswordField sample code for javax.swing.JPasswordField definition code for javax.swing.JPasswordField 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.
JPopupMenu sample code for javax.swing.JPopupMenu definition code for javax.swing.JPopupMenu An implementation of a popup menu -- a small window that pops up and displays a series of choices.
JPopupMenu.Separator sample code for javax.swing.JPopupMenu.Separator definition code for javax.swing.JPopupMenu.Separator A popup menu-specific separator.
JProgressBar sample code for javax.swing.JProgressBar definition code for javax.swing.JProgressBar A component that, by default, displays an integer value within a bounded interval.
JRadioButton sample code for javax.swing.JRadioButton definition code for javax.swing.JRadioButton An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user.
JRadioButtonMenuItem sample code for javax.swing.JRadioButtonMenuItem definition code for javax.swing.JRadioButtonMenuItem An implementation of a radio button menu item.
JRootPane sample code for javax.swing.JRootPane definition code for javax.swing.JRootPane A lightweight container used behind the scenes by JFrame, JDialog, JWindow, JApplet, and JInternalFrame.
JScrollBar sample code for javax.swing.JScrollBar definition code for javax.swing.JScrollBar An implementation of a scrollbar.
JScrollPane sample code for javax.swing.JScrollPane definition code for javax.swing.JScrollPane Provides a scrollable view of a lightweight component.
JSeparator sample code for javax.swing.JSeparator definition code for javax.swing.JSeparator 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.
JSlider sample code for javax.swing.JSlider definition code for javax.swing.JSlider A component that lets the user graphically select a value by sliding a knob within a bounded interval.
JSpinner sample code for javax.swing.JSpinner definition code for javax.swing.JSpinner A single line input field that lets the user select a number or an object value from an ordered sequence.
JSpinner.DateEditor sample code for javax.swing.JSpinner.DateEditor definition code for javax.swing.JSpinner.DateEditor An editor for a JSpinner whose model is a SpinnerDateModel.
JSpinner.DefaultEditor sample code for javax.swing.JSpinner.DefaultEditor definition code for javax.swing.JSpinner.DefaultEditor A simple base class for more specialized editors that displays a read-only view of the model's current value with a JFormattedTextField.
JSpinner.ListEditor sample code for javax.swing.JSpinner.ListEditor definition code for javax.swing.JSpinner.ListEditor An editor for a JSpinner whose model is a SpinnerListModel.
JSpinner.NumberEditor sample code for javax.swing.JSpinner.NumberEditor definition code for javax.swing.JSpinner.NumberEditor An editor for a JSpinner whose model is a SpinnerNumberModel.
JSplitPane sample code for javax.swing.JSplitPane definition code for javax.swing.JSplitPane JSplitPane is used to divide two (and only two) Components.
JTabbedPane sample code for javax.swing.JTabbedPane definition code for javax.swing.JTabbedPane A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
JTable sample code for javax.swing.JTable definition code for javax.swing.JTable The JTable is used to display and edit regular two-dimensional tables of cells.
JTextArea sample code for javax.swing.JTextArea definition code for javax.swing.JTextArea A JTextArea is a multi-line area that displays plain text.
JTextField sample code for javax.swing.JTextField definition code for javax.swing.JTextField JTextField is a lightweight component that allows the editing of a single line of text.
JTextPane sample code for javax.swing.JTextPane definition code for javax.swing.JTextPane A text component that can be marked up with attributes that are represented graphically.
JToggleButton sample code for javax.swing.JToggleButton definition code for javax.swing.JToggleButton An implementation of a two-state button.
JToggleButton.ToggleButtonModel sample code for javax.swing.JToggleButton.ToggleButtonModel definition code for javax.swing.JToggleButton.ToggleButtonModel The ToggleButton model
JToolBar sample code for javax.swing.JToolBar definition code for javax.swing.JToolBar JToolBar provides a component that is useful for displaying commonly used Actions or controls.
JToolBar.Separator sample code for javax.swing.JToolBar.Separator definition code for javax.swing.JToolBar.Separator A toolbar-specific separator.
JToolTip sample code for javax.swing.JToolTip definition code for javax.swing.JToolTip Used to display a "Tip" for a Component.
JTree sample code for javax.swing.JTree definition code for javax.swing.JTree A control that displays a set of hierarchical data as an outline.
JTree.DynamicUtilTreeNode sample code for javax.swing.JTree.DynamicUtilTreeNode definition code for javax.swing.JTree.DynamicUtilTreeNode DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.
JTree.EmptySelectionModel sample code for javax.swing.JTree.EmptySelectionModel definition code for javax.swing.JTree.EmptySelectionModel EmptySelectionModel is a TreeSelectionModel that does not allow anything to be selected.
JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport The "viewport" or "porthole" through which you see the underlying information.
JWindow sample code for javax.swing.JWindow definition code for javax.swing.JWindow A JWindow is a container that can be displayed anywhere on the user's desktop.
KeyStroke sample code for javax.swing.KeyStroke definition code for javax.swing.KeyStroke A KeyStroke represents a key action on the keyboard, or equivalent input device.
LayoutFocusTraversalPolicy sample code for javax.swing.LayoutFocusTraversalPolicy definition code for javax.swing.LayoutFocusTraversalPolicy A SortingFocusTraversalPolicy which sorts Components based on their size, position, and orientation.
LookAndFeel sample code for javax.swing.LookAndFeel definition code for javax.swing.LookAndFeel Completely characterizes a look and feel from the point of view of the pluggable look and feel components.
MenuSelectionManager sample code for javax.swing.MenuSelectionManager definition code for javax.swing.MenuSelectionManager A MenuSelectionManager owns the selection in menu hierarchy.
OverlayLayout sample code for javax.swing.OverlayLayout definition code for javax.swing.OverlayLayout A layout manager to arrange components over the top of each other.
Popup sample code for javax.swing.Popup definition code for javax.swing.Popup Popups are used to display a Component to the user, typically on top of all the other Components in a particular containment hierarchy.
PopupFactory sample code for javax.swing.PopupFactory definition code for javax.swing.PopupFactory PopupFactory, as the name implies, is used to obtain instances of Popups.
ProgressMonitor sample code for javax.swing.ProgressMonitor definition code for javax.swing.ProgressMonitor A class to monitor the progress of some operation.
ProgressMonitorInputStream sample code for javax.swing.ProgressMonitorInputStream definition code for javax.swing.ProgressMonitorInputStream Monitors the progress of reading from some InputStream.
RepaintManager sample code for javax.swing.RepaintManager definition code for javax.swing.RepaintManager This class manages repaint requests, allowing the number of repaints to be minimized, for example by collapsing multiple requests into a single repaint for members of a component tree.
ScrollPaneLayout sample code for javax.swing.ScrollPaneLayout definition code for javax.swing.ScrollPaneLayout The layout manager used by JScrollPane.
ScrollPaneLayout.UIResource sample code for javax.swing.ScrollPaneLayout.UIResource definition code for javax.swing.ScrollPaneLayout.UIResource The UI resource version of ScrollPaneLayout.
SizeRequirements sample code for javax.swing.SizeRequirements definition code for javax.swing.SizeRequirements For the convenience of layout managers, calculates information about the size and position of components.
SizeSequence sample code for javax.swing.SizeSequence definition code for javax.swing.SizeSequence A SizeSequence object efficiently maintains an ordered list of sizes and corresponding positions.
SortingFocusTraversalPolicy sample code for javax.swing.SortingFocusTraversalPolicy definition code for javax.swing.SortingFocusTraversalPolicy A FocusTraversalPolicy that determines traversal order by sorting the Components of a focus traversal cycle based on a given Comparator.
SpinnerDateModel sample code for javax.swing.SpinnerDateModel definition code for javax.swing.SpinnerDateModel A SpinnerModel for sequences of Dates.
SpinnerListModel sample code for javax.swing.SpinnerListModel definition code for javax.swing.SpinnerListModel A simple implementation of SpinnerModel whose values are defined by an array or a List.
SpinnerNumberModel sample code for javax.swing.SpinnerNumberModel definition code for javax.swing.SpinnerNumberModel A SpinnerModel for sequences of numbers.
Spring sample code for javax.swing.Spring definition code for javax.swing.Spring An instance of the Spring class holds three properties that characterize its behavior: the minimum, preferred, and maximum values.
SpringLayout sample code for javax.swing.SpringLayout definition code for javax.swing.SpringLayout A SpringLayout lays out the children of its associated container according to a set of constraints.
SpringLayout.Constraints sample code for javax.swing.SpringLayout.Constraints definition code for javax.swing.SpringLayout.Constraints A Constraints object holds the constraints that govern the way a component's size and position change in a container controlled by a SpringLayout.
SwingUtilities sample code for javax.swing.SwingUtilities definition code for javax.swing.SwingUtilities A collection of utility methods for Swing.
Timer sample code for javax.swing.Timer definition code for javax.swing.Timer Fires one or more action events after a specified delay.
ToolTipManager sample code for javax.swing.ToolTipManager definition code for javax.swing.ToolTipManager Manages all the ToolTips in the system.
TransferHandler sample code for javax.swing.TransferHandler definition code for javax.swing.TransferHandler This class is used to handle the transfer of a Transferable to and from Swing components.
UIDefaults sample code for javax.swing.UIDefaults definition code for javax.swing.UIDefaults A table of defaults for Swing components.
UIDefaults.LazyInputMap sample code for javax.swing.UIDefaults.LazyInputMap definition code for javax.swing.UIDefaults.LazyInputMap LazyInputMap will create a InputMap in its createValue method.
UIDefaults.ProxyLazyValue sample code for javax.swing.UIDefaults.ProxyLazyValue definition code for javax.swing.UIDefaults.ProxyLazyValue This class provides an implementation of LazyValue which can be used to delay loading of the Class for the instance to be created.
UIManager sample code for javax.swing.UIManager definition code for javax.swing.UIManager This class keeps track of the current look and feel and its defaults.
UIManager.LookAndFeelInfo sample code for javax.swing.UIManager.LookAndFeelInfo definition code for javax.swing.UIManager.LookAndFeelInfo Provides a little information about an installed LookAndFeel for the sake of configuring a menu or for initial application set up.
ViewportLayout sample code for javax.swing.ViewportLayout definition code for javax.swing.ViewportLayout The default layout manager for JViewport.

Enum Summary
JTable.PrintMode sample code for javax.swing.JTable.PrintMode definition code for javax.swing.JTable.PrintMode Printing modes, used in printing JTables.

Exception Summary
UnsupportedLookAndFeelException sample code for javax.swing.UnsupportedLookAndFeelException definition code for javax.swing.UnsupportedLookAndFeelException An exception that indicates the requested look & feel management classes are not present on the user's system.