Uses of Class
java.beans.BeanProperty
Package | Description |
---|---|
java.awt |
Contains all of the classes for creating user interfaces and for painting
graphics and images.
|
javax.accessibility |
Defines a contract between user-interface components and an assistive
technology that provides access to those components.
|
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.colorchooser |
Contains classes and interfaces used by the
JColorChooser component. |
javax.swing.table |
Provides classes and interfaces for dealing with
javax.swing.JTable . |
javax.swing.text |
Provides classes and interfaces that deal with editable and noneditable text
components.
|
javax.swing.tree |
Provides classes and interfaces for dealing with
javax.swing.JTree . |
-
Uses of BeanProperty in java.awt
Methods in java.awt with annotations of type BeanProperty Modifier and Type Method Description AccessibleContext
Button. getAccessibleContext()
Gets theAccessibleContext
associated with thisButton
. -
Uses of BeanProperty in javax.accessibility
Methods in javax.accessibility with annotations of type BeanProperty Modifier and Type Method Description void
AccessibleContext. setAccessibleDescription(String s)
Sets the accessible description of this object.void
AccessibleContext. setAccessibleName(String s)
Sets the localized accessible name of this object. -
Uses of BeanProperty in javax.swing
Methods in javax.swing with annotations of type BeanProperty Modifier and Type Method Description void
JFileChooser. addChoosableFileFilter(FileFilter filter)
Adds a filter to the list of user choosable file filters.FileFilter
JFileChooser. getAcceptAllFileFilter()
Returns theAcceptAll
file filter.AccessibleContext
Box. getAccessibleContext()
Gets the AccessibleContext associated with this Box.AccessibleContext
ImageIcon. getAccessibleContext()
Gets the AccessibleContext associated with this ImageIcon.AccessibleContext
JButton. getAccessibleContext()
Gets theAccessibleContext
associated with thisJButton
.AccessibleContext
JCheckBox. getAccessibleContext()
Gets the AccessibleContext associated with this JCheckBox.AccessibleContext
JCheckBoxMenuItem. getAccessibleContext()
Gets the AccessibleContext associated with this JCheckBoxMenuItem.AccessibleContext
JColorChooser. getAccessibleContext()
Gets the AccessibleContext associated with this JColorChooser.AccessibleContext
JComboBox. getAccessibleContext()
Gets the AccessibleContext associated with this JComboBox.AccessibleContext
JDesktopPane. getAccessibleContext()
Gets theAccessibleContext
associated with thisJDesktopPane
.AccessibleContext
JEditorPane. getAccessibleContext()
Gets the AccessibleContext associated with this JEditorPane.AccessibleContext
JFileChooser. getAccessibleContext()
Gets the AccessibleContext associated with this JFileChooser.AccessibleContext
JInternalFrame. getAccessibleContext()
Gets theAccessibleContext
associated with thisJInternalFrame
.AccessibleContext
JLabel. getAccessibleContext()
Get the AccessibleContext of this objectAccessibleContext
JLayeredPane. getAccessibleContext()
Gets the AccessibleContext associated with this JLayeredPane.AccessibleContext
JList. getAccessibleContext()
Gets theAccessibleContext
associated with thisJList
.AccessibleContext
JMenu. getAccessibleContext()
Gets the AccessibleContext associated with this JMenu.AccessibleContext
JMenuBar. getAccessibleContext()
Gets the AccessibleContext associated with this JMenuBar.AccessibleContext
JMenuItem. getAccessibleContext()
Returns theAccessibleContext
associated with thisJMenuItem
.AccessibleContext
JOptionPane. getAccessibleContext()
Returns theAccessibleContext
associated with this JOptionPane.AccessibleContext
JPanel. getAccessibleContext()
Gets the AccessibleContext associated with this JPanel.AccessibleContext
JPasswordField. getAccessibleContext()
Returns theAccessibleContext
associated with thisJPasswordField
.AccessibleContext
JPopupMenu. getAccessibleContext()
Gets the AccessibleContext associated with this JPopupMenu.AccessibleContext
JProgressBar. getAccessibleContext()
Gets theAccessibleContext
associated with thisJProgressBar
.AccessibleContext
JRadioButton. getAccessibleContext()
Gets the AccessibleContext associated with this JRadioButton.AccessibleContext
JRadioButtonMenuItem. getAccessibleContext()
Gets the AccessibleContext associated with this JRadioButtonMenuItem.AccessibleContext
JScrollBar. getAccessibleContext()
Gets the AccessibleContext associated with this JScrollBar.AccessibleContext
JScrollPane. getAccessibleContext()
Gets the AccessibleContext associated with this JScrollPane.AccessibleContext
JSeparator. getAccessibleContext()
Gets the AccessibleContext associated with this JSeparator.AccessibleContext
JSlider. getAccessibleContext()
Gets the AccessibleContext associated with this JSlider.AccessibleContext
JSpinner. getAccessibleContext()
Gets theAccessibleContext
for theJSpinner
AccessibleContext
JSplitPane. getAccessibleContext()
Gets the AccessibleContext associated with this JSplitPane.AccessibleContext
JTabbedPane. getAccessibleContext()
Gets the AccessibleContext associated with this JTabbedPane.AccessibleContext
JTable. getAccessibleContext()
Gets the AccessibleContext associated with this JTable.AccessibleContext
JTextArea. getAccessibleContext()
Gets the AccessibleContext associated with this JTextArea.AccessibleContext
JTextField. getAccessibleContext()
Gets theAccessibleContext
associated with thisJTextField
.AccessibleContext
JToggleButton. getAccessibleContext()
Gets the AccessibleContext associated with this JToggleButton.AccessibleContext
JToolBar. getAccessibleContext()
Gets the AccessibleContext associated with this JToolBar.AccessibleContext
JTree. getAccessibleContext()
Gets the AccessibleContext associated with this JTree.ActionListener[]
AbstractButton. getActionListeners()
Returns an array of all theActionListener
s added to this AbstractButton with addActionListener().ActionListener[]
JComboBox. getActionListeners()
Returns an array of all theActionListener
s added to this JComboBox with addActionListener().ActionListener[]
JFileChooser. getActionListeners()
Returns an array of all the action listeners registered on this file chooser.ActionListener[]
JTextField. getActionListeners()
Returns an array of all theActionListener
s added to this JTextField with addActionListener().Action[]
JFormattedTextField. getActions()
Fetches the command list for the editor.Action[]
JTextField. getActions()
Fetches the command list for the editor.AdjustmentListener[]
JScrollBar. getAdjustmentListeners()
Returns an array of all theAdjustmentListener
s added to this JScrollBar with addAdjustmentListener().JInternalFrame[]
JDesktopPane. getAllFrames()
Returns allJInternalFrames
currently displayed in the desktop.AncestorListener[]
JComponent. getAncestorListeners()
Returns an array of all the ancestor listeners registered on this component.int
JList. getAnchorSelectionIndex()
Returns the anchor selection index.Component.BaselineResizeBehavior
JComponent. getBaselineResizeBehavior()
Returns an enum indicating how the baseline of the component changes as the size changes.ChangeListener[]
AbstractButton. getChangeListeners()
Returns an array of all theChangeListener
s added to this AbstractButton with addChangeListener().ChangeListener[]
JProgressBar. getChangeListeners()
Returns an array of all theChangeListener
s added to this progress bar withaddChangeListener
.ChangeListener[]
JSlider. getChangeListeners()
Returns an array of all theChangeListener
s added to this JSlider with addChangeListener().ChangeListener[]
JSpinner. getChangeListeners()
Returns an array of all theChangeListener
s added to this JSpinner with addChangeListener().ChangeListener[]
JTabbedPane. getChangeListeners()
Returns an array of all theChangeListener
s added to thisJTabbedPane
withaddChangeListener
.AttributeSet
JTextPane. getCharacterAttributes()
Fetches the character attributes in effect at the current location of the caret, ornull
.FileFilter[]
JFileChooser. getChoosableFileFilters()
Gets the list of user choosable file filters.int
JTable. getColumnCount()
Returns the number of columns in the column model.JDesktopPane
JInternalFrame. getDesktopPane()
Convenience method that searches the ancestor hierarchy for aJDesktop
instance.JList.DropLocation
JList. getDropLocation()
Returns the location that this component should visually indicate as the drop location during a DnD operation over the component, ornull
if no location is to currently be shown.JTable.DropLocation
JTable. getDropLocation()
Returns the location that this component should visually indicate as the drop location during a DnD operation over the component, ornull
if no location is to currently be shown.JTree.DropLocation
JTree. getDropLocation()
Returns the location that this component should visually indicate as the drop location during a DnD operation over the component, ornull
if no location is to currently be shown.TreePath
JTree. getEditingPath()
Returns the path to the element that is currently being edited.Component
JTable. getEditorComponent()
Returns the component that is handling the editing session.int
JList. getFirstVisibleIndex()
Returns the smallest list index that is currently visible.Container
JInternalFrame. getFocusCycleRootAncestor()
Always returnsnull
becauseJInternalFrame
s must always be roots of a focus traversal cycle.JFormattedTextField.AbstractFormatter
JFormattedTextField. getFormatter()
Returns theAbstractFormatter
that is used to format and parse the current value.Graphics
JApplet. getGraphics()
Deprecated.Creates a graphics context for this component.Graphics
JComponent. getGraphics()
Returns this component's graphics context, which lets you draw on a component.Graphics
JDialog. getGraphics()
Creates a graphics context for this component.Graphics
JFrame. getGraphics()
Creates a graphics context for this component.Graphics
JWindow. getGraphics()
Creates a graphics context for this component.int
JComponent. getHeight()
Returns the current height of this component.BoundedRangeModel
JTextField. getHorizontalVisibility()
Gets the visibility of the text field.HyperlinkListener[]
JEditorPane. getHyperlinkListeners()
Returns an array of all theHyperLinkListener
s added to this JEditorPane with addHyperlinkListener().MutableAttributeSet
JTextPane. getInputAttributes()
Gets the input attributes for the pane.Insets
JComponent. getInsets()
If a border has been set on this component, returns the border's insets; otherwise callssuper.getInsets
.Insets
JViewport. getInsets(Insets insets)
Returns anInsets
object containing thisJViewport
s inset values.InternalFrameListener[]
JInternalFrame. getInternalFrameListeners()
Returns an array of all theInternalFrameListener
s added to thisJInternalFrame
withaddInternalFrameListener
.int
JComboBox. getItemCount()
Returns the number of items in the list.int
JMenu. getItemCount()
Returns the number of items on the menu, including separators.ItemListener[]
AbstractButton. getItemListeners()
Returns an array of all theItemListener
s added to this AbstractButton with addItemListener().ItemListener[]
JComboBox. getItemListeners()
Returns an array of all theItemListener
s added to this JComboBox with addItemListener().Cursor
JInternalFrame. getLastCursor()
Returns the lastCursor
that was set by thesetCursor
method that is not a resizableCursor
.Object
JTree. getLastSelectedPathComponent()
Returns the last path component of the selected path.int
JList. getLastVisibleIndex()
Returns the largest list index that is currently visible.int
JList. getLeadSelectionIndex()
Returns the lead selection index.int
JTree. getLeadSelectionRow()
Returns the row index corresponding to the lead path.Component
JSplitPane. getLeftComponent()
Returns the component to the left (or above) the divider.int
JTextArea. getLineCount()
Determines the number of lines contained in the area.ListSelectionListener[]
JList. getListSelectionListeners()
Returns an array of all theListSelectionListener
s added to thisJList
by way ofaddListSelectionListener
.Insets
JPopupMenu. getMargin()
Returns the margin, in pixels, between the popup menu's border and its containers.int
JOptionPane. getMaxCharactersPerLineCount()
Returns the maximum number of characters to place on a line in a message.int
JSplitPane. getMaximumDividerLocation()
Returns the maximum location of the divider from the look and feel implementation.int
JList. getMaxSelectionIndex()
Returns the largest selected cell index, or-1
if the selection is empty.int
JTree. getMaxSelectionRow()
Returns the largest selected row.int
JMenu. getMenuComponentCount()
Returns the number of components on the menu.Component[]
JMenu. getMenuComponents()
Returns an array ofComponent
s of the menu's subcomponents.int
JMenuBar. getMenuCount()
Returns the number of items in the menu bar.MenuDragMouseListener[]
JMenuItem. getMenuDragMouseListeners()
Returns an array of all theMenuDragMouseListener
s added to this JMenuItem with addMenuDragMouseListener().MenuKeyListener[]
JMenuItem. getMenuKeyListeners()
Returns an array of all theMenuKeyListener
s added to this JMenuItem with addMenuKeyListener().MenuKeyListener[]
JPopupMenu. getMenuKeyListeners()
Returns an array of all theMenuKeyListener
s added to this JPopupMenu with addMenuKeyListener().MenuListener[]
JMenu. getMenuListeners()
Returns an array of all theMenuListener
s added to this JMenu with addMenuListener().int
JSplitPane. getMinimumDividerLocation()
Returns the minimum location of the divider from the look and feel implementation.int
JList. getMinSelectionIndex()
Returns the smallest selected cell index, or-1
if the selection is empty.int
JTree. getMinSelectionRow()
Returns the smallest selected row.Component
JInternalFrame. getMostRecentFocusOwner()
Returns the child component of thisJInternalFrame
that will receive the focus when thisJInternalFrame
is selected.Object
JSpinner. getNextValue()
Returns the object in the sequence that comes after the object returned bygetValue()
.AttributeSet
JTextPane. getParagraphAttributes()
Fetches the current paragraph attributes in effect at the location of the caret, ornull
if none.char[]
JPasswordField. getPassword()
Returns the text contained in thisTextComponent
.TreePath
JTree. getPathForRow(int row)
Returns the path for the specified row.double
JProgressBar. getPercentComplete()
Returns the percent complete for the progress bar.JPopupMenu
JMenu. getPopupMenu()
Returns the popupmenu associated with this menu.PopupMenuListener[]
JComboBox. getPopupMenuListeners()
Returns an array of all thePopupMenuListener
s added to this JComboBox with addPopupMenuListener().PopupMenuListener[]
JPopupMenu. getPopupMenuListeners()
Returns an array of all thePopupMenuListener
s added to this JMenuItem with addPopupMenuListener().Dimension
JList. getPreferredScrollableViewportSize()
Computes the size of viewport needed to displayvisibleRowCount
rows.Dimension
JTextArea. getPreferredScrollableViewportSize()
Returns the preferred size of the viewport if this component is embedded in a JScrollPane.Dimension
JTree. getPreferredScrollableViewportSize()
Returns the preferred display size of aJTree
.Object
JSpinner. getPreviousValue()
Returns the object in the sequence that comes before the object returned bygetValue()
.KeyStroke[]
JComponent. getRegisteredKeyStrokes()
Returns theKeyStrokes
that will initiate registered actions.JRootPane
JApplet. getRootPane()
Deprecated.Returns the rootPane object for this applet.JRootPane
JComponent. getRootPane()
Returns theJRootPane
ancestor for this component.JRootPane
JDialog. getRootPane()
Returns therootPane
object for this dialog.JRootPane
JFrame. getRootPane()
Returns therootPane
object for this frame.JRootPane
JInternalFrame. getRootPane()
Returns therootPane
object for this internal frame.JRootPane
JWindow. getRootPane()
Returns therootPane
object for this window.int
JTable. getRowCount()
Returns the number of rows that can be shown in theJTable
, given unlimited space.int
JTree. getRowCount()
Returns the number of viewable nodes.boolean
JEditorPane. getScrollableTracksViewportHeight()
Returns true if a viewport should always force the height of thisScrollable
to match the height of the viewport.boolean
JList. getScrollableTracksViewportHeight()
Returnstrue
if thisJList
is displayed in aJViewport
and the viewport is taller than the list's preferred height, or if the layout orientation isVERTICAL_WRAP
andvisibleRowCount <= 0
; otherwise returnsfalse
.boolean
JTable. getScrollableTracksViewportHeight()
Returnsfalse
to indicate that the height of the viewport does not determine the height of the table, unlessgetFillsViewportHeight
istrue
and the preferred height of the table is smaller than the viewport's height.boolean
JTree. getScrollableTracksViewportHeight()
Returns false to indicate that the height of the viewport does not determine the height of the table, unless the preferred height of the tree is smaller than the viewports height.boolean
JEditorPane. getScrollableTracksViewportWidth()
Returns true if a viewport should always force the width of thisScrollable
to match the width of the viewport.boolean
JList. getScrollableTracksViewportWidth()
Returnstrue
if thisJList
is displayed in aJViewport
and the viewport is wider than the list's preferred width, or if the layout orientation isHORIZONTAL_WRAP
andvisibleRowCount <= 0
; otherwise returnsfalse
.boolean
JTable. getScrollableTracksViewportWidth()
Returns false ifautoResizeMode
is set toAUTO_RESIZE_OFF
, which indicates that the width of the viewport does not determine the width of the table.boolean
JTextArea. getScrollableTracksViewportWidth()
Returns true if a viewport should always force the width of this Scrollable to match the width of the viewport.boolean
JTree. getScrollableTracksViewportWidth()
Returns false to indicate that the width of the viewport does not determine the width of the table, unless the preferred width of the tree is smaller than the viewports width.int
JTable. getSelectedColumn()
Returns the index of the first selected column, -1 if no column is selected.int
JTable. getSelectedColumnCount()
Returns the number of selected columns.int[]
JTable. getSelectedColumns()
Returns the indices of all selected columns.Object[]
AbstractButton. getSelectedObjects()
Returns an array (length 1) containing the label ornull
if the button is not selected.Object[]
JCheckBoxMenuItem. getSelectedObjects()
Returns an array (length 1) containing the check box menu item label or null if the check box is not selected.Object[]
JComboBox. getSelectedObjects()
Returns an array containing the selected item.int
JTable. getSelectedRow()
Returns the index of the first selected row, -1 if no row is selected.int
JTable. getSelectedRowCount()
Returns the number of selected rows.int[]
JTable. getSelectedRows()
Returns the indices of all selected rows.E
JList. getSelectedValue()
Returns the value for the smallest selected cell index; the selected value when only a single item is selected in the list.Object[]
JList. getSelectedValues()
Deprecated.As of JDK 1.7, replaced byJList.getSelectedValuesList()
List<E>
JList. getSelectedValuesList()
Returns a list of all the selected items, in increasing order based on their indices in the list.int
JTree. getSelectionCount()
Returns the number of nodes selected.MenuElement[]
JMenu. getSubElements()
Returns an array ofMenuElement
s containing the submenu for this menu component.MenuElement[]
JMenuBar. getSubElements()
Implemented to be aMenuElement
-- returns the menus in this menu bar.MenuElement[]
JMenuItem. getSubElements()
This method returns an array containing the sub-menu components for this menu component.MenuElement[]
JPopupMenu. getSubElements()
Returns an array ofMenuElement
s containing the submenu for this menu component.int
JTabbedPane. getTabCount()
Returns the number of tabs in thistabbedpane
.int
JTabbedPane. getTabRunCount()
Returns the number of tab runs currently used to display the tabs.Container
JComponent. getTopLevelAncestor()
Returns the top-level ancestor of this component (either the containingWindow
orApplet
), ornull
if this component has not been added to any container.TreeExpansionListener[]
JTree. getTreeExpansionListeners()
Returns an array of all theTreeExpansionListener
s added to this JTree with addTreeExpansionListener().TreeSelectionListener[]
JTree. getTreeSelectionListeners()
Returns an array of all theTreeSelectionListener
s added to this JTree with addTreeSelectionListener().TreeWillExpandListener[]
JTree. getTreeWillExpandListeners()
Returns an array of all theTreeWillExpandListener
s added to this JTree with addTreeWillExpandListener().FileChooserUI
JFileChooser. getUI()
Gets the UI object which implements the L&F for this component.ScrollPaneUI
JScrollPane. getUI()
Returns the look and feel (L&F) object that renders this component.SplitPaneUI
JSplitPane. getUI()
Returns theSplitPaneUI
that is providing the current look and feel.String
JButton. getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.String
JCheckBox. getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.String
JCheckBoxMenuItem. getUIClassID()
Returns the name of the L&F class that renders this component.String
JColorChooser. getUIClassID()
Returns the name of the L&F class that renders this component.String
JComboBox. getUIClassID()
Returns the name of the L&F class that renders this component.String
JComponent. getUIClassID()
Returns theUIDefaults
key used to look up the name of theswing.plaf.ComponentUI
class that defines the look and feel for this component.String
JDesktopPane. getUIClassID()
Returns the name of the L&F class that renders this component.String
JEditorPane. getUIClassID()
Gets the class ID for the UI.String
JFileChooser. getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.String
JFormattedTextField. getUIClassID()
Gets the class ID for a UI.String
JInternalFrame. getUIClassID()
Returns the name of the look-and-feel class that renders this component.String
JLabel. getUIClassID()
Returns a string that specifies the name of the l&f class that renders this component.String
JList. getUIClassID()
Returns"ListUI"
, theUIDefaults
key used to look up the name of thejavax.swing.plaf.ListUI
class that defines the look and feel for this component.String
JMenu. getUIClassID()
Returns the name of the L&F class that renders this component.String
JMenuBar. getUIClassID()
Returns the name of the L&F class that renders this component.String
JMenuItem. getUIClassID()
Returns the suffix used to construct the name of the L&F class used to render this component.String
JOptionPane. getUIClassID()
Returns the name of the UI class that implements the L&F for this component.String
JPanel. getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.String
JPasswordField. getUIClassID()
Returns the name of the L&F class that renders this component.String
JPopupMenu. getUIClassID()
Returns the name of the L&F class that renders this component.String
JProgressBar. getUIClassID()
Returns the name of the look-and-feel class that renders this component.String
JRadioButton. getUIClassID()
Returns the name of the L&F class that renders this component.String
JRadioButtonMenuItem. getUIClassID()
Returns the name of the L&F class that renders this component.String
JScrollBar. getUIClassID()
Returns the name of the LookAndFeel class for this component.String
JScrollPane. getUIClassID()
Returns the suffix used to construct the name of the L&F class used to render this component.String
JSeparator. getUIClassID()
Returns the name of the L&F class that renders this component.String
JSlider. getUIClassID()
Returns the name of the L&F class that renders this component.String
JSpinner. getUIClassID()
Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component.String
JSplitPane. getUIClassID()
Returns the name of the L&F class that renders this component.String
JTabbedPane. getUIClassID()
Returns the name of the UI class that implements the L&F for this component.String
JTable. getUIClassID()
Returns the suffix used to construct the name of the L&F class used to render this component.String
JTextArea. getUIClassID()
Returns the class ID for the UI.String
JTextField. getUIClassID()
Gets the class ID for a UI.String
JTextPane. getUIClassID()
Returns the class ID for the UI.String
JToggleButton. getUIClassID()
Returns a string that specifies the name of the l&f class that renders this component.String
JToolBar. getUIClassID()
Returns the name of the L&F class that renders this component.String
JTree. getUIClassID()
Returns the name of the L&F class that renders this component.VetoableChangeListener[]
JComponent. getVetoableChangeListeners()
Returns an array of all the vetoable change listeners registered on this component.Rectangle
JScrollPane. getViewportBorderBounds()
Returns the bounds of the viewport's border.Rectangle
JComponent. getVisibleRect()
Returns theComponent
's "visible rectangle" - the intersection of this component's visible rectangle,new Rectangle(0, 0, getWidth(), getHeight())
, and all of its ancestors' visible rectangles.String
JInternalFrame. getWarningString()
Gets the warning string that is displayed with this internal frame.int
JComponent. getWidth()
Returns the current width of this component.int
JComponent. getX()
Returns the current x coordinate of the component's origin.int
JComponent. getY()
Returns the current y coordinate of the component's origin.boolean
JButton. isDefaultButton()
Gets the value of thedefaultButton
property, which iftrue
means that this button is the current default button for itsJRootPane
.boolean
JFileChooser. isDirectorySelectionEnabled()
Convenience call that determines if directories are selectable based on the current file selection mode.boolean
JTable. isEditing()
Returns true if a cell is being edited.boolean
JTree. isEditing()
Returns true if the tree is being edited.boolean
JFormattedTextField. isEditValid()
Returns true if the current value being edited is valid.boolean
JFileChooser. isFileSelectionEnabled()
Convenience call that determines if files are selectable based on the current file selection mode.boolean
JTree. isFixedRowHeight()
Returns true if the height of each display row is a fixed size.boolean
JProgressBar. isIndeterminate()
Returns the value of theindeterminate
property.boolean
JComponent. isManagingFocus()
Deprecated.As of 1.4, replaced byComponent.setFocusTraversalKeys(int, Set)
andContainer.setFocusCycleRoot(boolean)
.boolean
JComponent. isOptimizedDrawingEnabled()
Returns true if this component tiles its children -- that is, if it can guarantee that the children will not overlap.boolean
JLayeredPane. isOptimizedDrawingEnabled()
Returns false if components in the pane can overlap, which makes optimized drawing impossible.boolean
JComponent. isPaintingForPrint()
Returnstrue
if the current painting operation on this component is part of aprint
operation.boolean
JComponent. isPaintingTile()
Returns true if the component is currently painting a tile.boolean
JMenuBar. isSelected()
Returns true if the menu bar currently has a component selected.boolean
JList. isSelectionEmpty()
Returnstrue
if nothing is selected, elsefalse
.boolean
JTree. isSelectionEmpty()
Returns true if the selection is currently empty.boolean
JMenu. isTearOff()
Returns true if the menu can be torn off.boolean
JMenu. isTopLevelMenu()
Returns true if the menu is a 'top-level menu', that is, if it is the direct child of a menubar.boolean
JScrollPane. isValidateRoot()
Overridden to return true so that any calls torevalidate
on any descendants of thisJScrollPane
will cause the entire tree beginning with thisJScrollPane
to be validated.boolean
JSplitPane. isValidateRoot()
Returns true, so that calls torevalidate
on any descendant of thisJSplitPane
will cause a request to be queued that will validate theJSplitPane
and all its descendants.boolean
JScrollPane. isWheelScrollingEnabled()
Indicates whether or not scrolling will take place in response to the mouse wheel.void
JMenuItem. setAccelerator(KeyStroke keyStroke)
Sets the key combination which invokes the menu item's action listeners without navigating the menu hierarchy.void
JFileChooser. setAcceptAllFileFilterUsed(boolean b)
Determines whether theAcceptAll FileFilter
is used as an available choice in the choosable filter list.void
JFileChooser. setAccessory(JComponent newAccessory)
Sets the accessory component.void
AbstractButton. setAction(Action a)
Sets theAction
.void
JComboBox. setAction(Action a)
Sets theAction
for theActionEvent
source.void
JTextField. setAction(Action a)
Sets theAction
for theActionEvent
source.void
JComponent. setAlignmentX(float alignmentX)
Sets the horizontal alignment.void
JComponent. setAlignmentY(float alignmentY)
Sets the vertical alignment.void
JTree. setAnchorSelectionPath(TreePath newPath)
Sets the path identified as the anchor.void
JFileChooser. setApproveButtonMnemonic(int mnemonic)
Sets the approve button's mnemonic using a numeric keycode.void
JFileChooser. setApproveButtonText(String approveButtonText)
Sets the text used in theApproveButton
in theFileChooserUI
.void
JFileChooser. setApproveButtonToolTipText(String toolTipText)
Sets the tooltip text used in theApproveButton
.void
JMenuItem. setArmed(boolean b)
Identifies the menu item as "armed".void
JTable. setAutoCreateColumnsFromModel(boolean autoCreateColumnsFromModel)
Sets this table'sautoCreateColumnsFromModel
flag.void
JTable. setAutoCreateRowSorter(boolean autoCreateRowSorter)
Specifies whether aRowSorter
should be created for the table whenever its model changes.void
JTable. setAutoResizeMode(int mode)
Sets the table's auto resize mode when the table is resized.void
JComponent. setAutoscrolls(boolean autoscrolls)
Sets theautoscrolls
property.void
JComponent. setBackground(Color bg)
Sets the background color of this component.void
JTabbedPane. setBackgroundAt(int index, Color background)
Sets the background color atindex
tobackground
which can benull
, in which case the tab's background color will default to the background color of thetabbedpane
.void
JScrollBar. setBlockIncrement(int blockIncrement)
Sets the blockIncrement property.void
JComponent. setBorder(Border border)
Sets the border of this component.void
AbstractButton. setBorderPainted(boolean b)
Sets theborderPainted
property.void
JMenuBar. setBorderPainted(boolean b)
Sets whether the border should be painted.void
JPopupMenu. setBorderPainted(boolean b)
Sets whether the border should be painted.void
JProgressBar. setBorderPainted(boolean b)
Sets theborderPainted
property, which istrue
if the progress bar should paint its border.void
JToolBar. setBorderPainted(boolean b)
Sets theborderPainted
property, which istrue
if the border should be painted.void
JCheckBox. setBorderPaintedFlat(boolean b)
Sets theborderPaintedFlat
property, which gives a hint to the look and feel as to the appearance of the check box border.void
JSplitPane. setBottomComponent(Component comp)
Sets the component below, or to the right of the divider.void
JTable. setCellEditor(TableCellEditor anEditor)
Sets the active cell editor.void
JTree. setCellEditor(TreeCellEditor cellEditor)
Sets the cell editor.void
JList. setCellRenderer(ListCellRenderer<? super E> cellRenderer)
Sets the delegate that is used to paint each cell in the list.void
JTree. setCellRenderer(TreeCellRenderer x)
Sets theTreeCellRenderer
that will be used to draw each cell.void
JTable. setCellSelectionEnabled(boolean cellSelectionEnabled)
Sets whether this table allows both a column selection and a row selection to exist simultaneously.void
JColorChooser. setChooserPanels(AbstractColorChooserPanel[] panels)
Specifies the Color Panels used to choose a color value.void
JInternalFrame. setClosable(boolean b)
Sets whether thisJInternalFrame
can be closed by some user action.void
JInternalFrame. setClosed(boolean b)
Closes this internal frame if the argument istrue
.void
JColorChooser. setColor(Color color)
Sets the current color of the color chooser to the specified color.void
JScrollPane. setColumnHeader(JViewport columnHeader)
Removes the old columnHeader, if it exists; if the new columnHeader isn'tnull
, syncs the x coordinate of its viewPosition with the viewport (if there is one) and then adds it to the scroll pane.void
JTable. setColumnModel(TableColumnModel columnModel)
Sets the column model for this table tocolumnModel
and registers for listener notifications from the new column model.void
JTextArea. setColumns(int columns)
Sets the number of columns for this TextArea.void
JTextField. setColumns(int columns)
Sets the number of columns in thisTextField
, and then invalidate the layout.void
JTable. setColumnSelectionAllowed(boolean columnSelectionAllowed)
Sets whether the columns in this model can be selected.void
JToolTip. setComponent(JComponent c)
Specifies the component that the tooltip describes.void
JTabbedPane. setComponentAt(int index, Component component)
Sets the component atindex
tocomponent
.void
JComponent. setComponentPopupMenu(JPopupMenu popup)
Sets theJPopupMenu
for thisJComponent
.void
AbstractButton. setContentAreaFilled(boolean b)
Sets thecontentAreaFilled
property.void
JApplet. setContentPane(Container contentPane)
Deprecated.Sets the contentPane property.void
JDialog. setContentPane(Container contentPane)
Sets thecontentPane
property.void
JFrame. setContentPane(Container contentPane)
Sets thecontentPane
property.void
JInternalFrame. setContentPane(Container c)
Sets thisJInternalFrame
'scontentPane
property.void
JWindow. setContentPane(Container contentPane)
Sets thecontentPane
property for this window.void
JEditorPane. setContentType(String type)
Sets the type of content that this editor handles.void
JSplitPane. setContinuousLayout(boolean newContinuousLayout)
Sets the value of thecontinuousLayout
property, which must betrue
for the child components to be continuously redisplayed and laid out during user intervention.void
JFileChooser. setControlButtonsAreShown(boolean b)
Sets the property that indicates whether the approve and cancel buttons are shown in the file chooser.void
JFileChooser. setCurrentDirectory(File dir)
Sets the current directory.void
JComponent. setDebugGraphicsOptions(int debugOptions)
Enables or disables diagnostic information about every graphics operation performed within the component or one of its children.void
JRootPane. setDefaultButton(JButton defaultButton)
Sets thedefaultButton
property, which determines the current default button for thisJRootPane
.void
JButton. setDefaultCapable(boolean defaultCapable)
Sets thedefaultCapable
property, which determines whether this button can be made the default button for its root pane.void
JDialog. setDefaultCloseOperation(int operation)
Sets the operation that will happen by default when the user initiates a "close" on this dialog.void
JFrame. setDefaultCloseOperation(int operation)
Sets the operation that will happen by default when the user initiates a "close" on this frame.void
JMenu. setDelay(int d)
Sets the suggested delay before the menu'sPopupMenu
is popped up or down.void
JInternalFrame. setDesktopIcon(JInternalFrame.JDesktopIcon d)
Sets theJDesktopIcon
associated with thisJInternalFrame
.void
JDesktopPane. setDesktopManager(DesktopManager d)
Sets theDesktopManger
that will handle desktop-specific UI actions.void
JFileChooser. setDialogTitle(String dialogTitle)
Sets the string that goes in theJFileChooser
window's title bar.void
JFileChooser. setDialogType(int dialogType)
Sets the type of this dialog.void
AbstractButton. setDisabledIcon(Icon disabledIcon)
Sets the disabled icon for the button.void
JLabel. setDisabledIcon(Icon disabledIcon)
Set the icon to be displayed if this JLabel is "disabled" (JLabel.setEnabled(false)).void
JTabbedPane. setDisabledIconAt(int index, Icon disabledIcon)
Sets the disabled icon atindex
toicon
which can benull
.void
AbstractButton. setDisabledSelectedIcon(Icon disabledSelectedIcon)
Sets the disabled selection icon for the button.void
JLabel. setDisplayedMnemonic(int key)
Specify a keycode that indicates a mnemonic key.void
AbstractButton. setDisplayedMnemonicIndex(int index)
Provides a hint to the look and feel as to which character in the text should be decorated to represent the mnemonic.void
JLabel. setDisplayedMnemonicIndex(int index)
Provides a hint to the look and feel as to which character in the text should be decorated to represent the mnemonic.void
JTabbedPane. setDisplayedMnemonicIndexAt(int tabIndex, int mnemonicIndex)
Provides a hint to the look and feel as to which character in the text should be decorated to represent the mnemonic.void
JSplitPane. setDividerLocation(double proportionalLocation)
Sets the divider location as a percentage of theJSplitPane
's size.void
JSplitPane. setDividerLocation(int location)
Sets the location of the divider.void
JSplitPane. setDividerSize(int newSize)
Sets the size of the divider.void
JFormattedTextField. setDocument(Document doc)
Associates the editor with a text document.void
JTextField. setDocument(Document doc)
Associates the editor with a text document.void
JColorChooser. setDragEnabled(boolean b)
Sets thedragEnabled
property, which must betrue
to enable automatic drag handling (the first part of drag and drop) on this component.void
JFileChooser. setDragEnabled(boolean b)
Sets thedragEnabled
property, which must betrue
to enable automatic drag handling (the first part of drag and drop) on this component.void
JList. setDragEnabled(boolean b)
Turns on or off automatic drag handling.void
JTable. setDragEnabled(boolean b)
Turns on or off automatic drag handling.void
JTree. setDragEnabled(boolean b)
Turns on or off automatic drag handling.void
JDesktopPane. setDragMode(int dragMode)
Sets the "dragging style" used by the desktop pane.void
JPasswordField. setEchoChar(char c)
Sets the echo character for thisJPasswordField
.void
JComboBox. setEditable(boolean aFlag)
Determines whether theJComboBox
field is editable.void
JTree. setEditable(boolean flag)
Determines whether the tree is editable.void
JComboBox. setEditor(ComboBoxEditor anEditor)
Sets the editor used to paint and edit the selected item in theJComboBox
field.void
JSpinner. setEditor(JComponent editor)
Changes theJComponent
that displays the current value of theSpinnerModel
.void
JEditorPane. setEditorKit(EditorKit kit)
Sets the currently installed kit for handling content.void
JComboBox. setEnabled(boolean b)
Enables the combo box so that items can be selected.void
JComponent. setEnabled(boolean enabled)
Sets whether or not this component is enabled.void
JMenuItem. setEnabled(boolean b)
Enables or disables the menu item.void
JTree. setExpandsSelectedPaths(boolean newValue)
Configures theexpandsSelectedPaths
property.void
JSlider. setExtent(int extent)
Sets the size of the range "covered" by the knob.void
JFileChooser. setFileFilter(FileFilter filter)
Sets the current file filter.void
JFileChooser. setFileHidingEnabled(boolean b)
Sets file hiding on or off.void
JFileChooser. setFileSelectionMode(int mode)
Sets theJFileChooser
to allow the user to just select files, just select directories, or select both files and directories.void
JFileChooser. setFileSystemView(FileSystemView fsv)
Sets the file system view that theJFileChooser
uses for accessing and creating file system resources, such as finding the floppy drive and getting a list of root drives.void
JFileChooser. setFileView(FileView fileView)
Sets the file view to be used to retrieve UI information, such as the icon that represents a file or the type description of a file.void
JTable. setFillsViewportHeight(boolean fillsViewportHeight)
Sets whether or not this table is always made large enough to fill the height of an enclosing viewport.void
JList. setFixedCellHeight(int height)
Sets a fixed value to be used for the height of every cell in the list.void
JList. setFixedCellWidth(int width)
Sets a fixed value to be used for the width of every cell in the list.void
JToolBar. setFloatable(boolean b)
Sets thefloatable
property, which must betrue
for the user to move the tool bar.void
JFormattedTextField. setFocusLostBehavior(int behavior)
Sets the behavior when focus is lost.void
AbstractButton. setFocusPainted(boolean b)
Sets thepaintFocus
property, which must betrue
for the focus state to be painted.void
JComponent. setFont(Font font)
Sets the font for this component.void
JComponent. setForeground(Color fg)
Sets the foreground color of this component.void
JTabbedPane. setForegroundAt(int index, Color foreground)
Sets the foreground color atindex
toforeground
which can benull
, in which case the tab's foreground color will default to the foreground color of thistabbedpane
.void
JFormattedTextField. setFormatterFactory(JFormattedTextField.AbstractFormatterFactory tf)
Sets theAbstractFormatterFactory
.void
JInternalFrame. setFrameIcon(Icon icon)
Sets an image to be displayed in the titlebar of this internal frame (usually in the top-left corner).void
JApplet. setGlassPane(Component glassPane)
Deprecated.Sets the glassPane property.void
JDialog. setGlassPane(Component glassPane)
Sets theglassPane
property.void
JFrame. setGlassPane(Component glassPane)
Sets theglassPane
property.void
JInternalFrame. setGlassPane(Component glass)
Sets thisJInternalFrame
'sglassPane
property.void
JWindow. setGlassPane(Component glassPane)
Sets theglassPane
property.void
JTable. setGridColor(Color gridColor)
Sets the color used to draw grid lines togridColor
and redisplays.void
AbstractButton. setHideActionText(boolean hideActionText)
Sets thehideActionText
property, which determines whether the button displays text from theAction
.void
AbstractButton. setHorizontalAlignment(int alignment)
Sets the horizontal alignment of the icon and text.void
JLabel. setHorizontalAlignment(int alignment)
Sets the alignment of the label's contents along the X axis.void
JTextField. setHorizontalAlignment(int alignment)
Sets the horizontal alignment of the text.void
JScrollPane. setHorizontalScrollBar(JScrollBar horizontalScrollBar)
Adds the scrollbar that controls the viewport's horizontal view position to the scrollpane.void
JScrollPane. setHorizontalScrollBarPolicy(int policy)
Determines when the horizontal scrollbar appears in the scrollpane.void
AbstractButton. setHorizontalTextPosition(int textPosition)
Sets the horizontal position of the text relative to the icon.void
JLabel. setHorizontalTextPosition(int textPosition)
Sets the horizontal position of the label's text, relative to its image.void
AbstractButton. setIcon(Icon defaultIcon)
Sets the button's default icon.void
JInternalFrame. setIcon(boolean b)
Iconifies or de-iconifies this internal frame, if the look and feel supports iconification.void
JLabel. setIcon(Icon icon)
Defines the icon this component will display.void
JOptionPane. setIcon(Icon newIcon)
Sets the icon to display.void
JTabbedPane. setIconAt(int index, Icon icon)
Sets the icon atindex
toicon
which can benull
.void
JInternalFrame. setIconifiable(boolean b)
Sets theiconable
property, which must betrue
for the user to be able to make theJInternalFrame
an icon.void
AbstractButton. setIconTextGap(int iconTextGap)
If both the icon and text properties are set, this property defines the space between them.void
JLabel. setIconTextGap(int iconTextGap)
If both the icon and text properties are set, this property defines the space between them.void
JComponent. setInheritsPopupMenu(boolean value)
Sets whether or notgetComponentPopupMenu
should delegate to the parent if this component does not have aJPopupMenu
assigned to it.void
JOptionPane. setInitialSelectionValue(Object newValue)
Sets the input value that is initially displayed as selected to the user.void
JOptionPane. setInitialValue(Object newInitialValue)
Sets the initial value that is to be enabled -- theComponent
that has the focus when the pane is initially displayed.void
JOptionPane. setInputValue(Object newValue)
Sets the input value that was selected or input by the user.void
JComponent. setInputVerifier(InputVerifier inputVerifier)
Sets the input verifier for this component.void
JTable. setIntercellSpacing(Dimension intercellSpacing)
Sets therowMargin
and thecolumnMargin
-- the height and width of the space between cells -- tointercellSpacing
.void
JSlider. setInverted(boolean b)
Specify true to reverse the value-range shown for the slider and false to put the value range in the normal order.void
JPopupMenu. setInvoker(Component invoker)
Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.void
JTree. setInvokesStopCellEditing(boolean newValue)
Determines what happens when editing is interrupted by selecting another node in the tree, a change in the tree's data, or by some other means.void
JApplet. setJMenuBar(JMenuBar menuBar)
Deprecated.Sets the menubar for this applet.void
JDialog. setJMenuBar(JMenuBar menu)
Sets the menubar for this dialog.void
JFrame. setJMenuBar(JMenuBar menubar)
Sets the menubar for this frame.void
JInternalFrame. setJMenuBar(JMenuBar m)
Sets themenuBar
property for thisJInternalFrame
.void
JComboBox. setKeySelectionManager(JComboBox.KeySelectionManager aManager)
Sets the object that translates a keyboard character into a list selection.void
AbstractButton. setLabel(String label)
Deprecated.- Replaced bysetText(text)
void
JPopupMenu. setLabel(String label)
Sets the popup menu's label.void
JLabel. setLabelFor(Component c)
Set the component this is labelling.void
JSlider. setLabelTable(Dictionary labels)
Used to specify what label will be drawn at any given value.void
JTree. setLargeModel(boolean newValue)
Specifies whether the UI should use a large model.void
JSplitPane. setLastDividerLocation(int newLastLocation)
Sets the last location the divider was at tonewLastLocation
.void
JInternalFrame. setLayer(int layer)
Convenience method for setting the layer attribute of this component.void
JInternalFrame. setLayer(Integer layer)
Convenience method for setting the layer attribute of this component.void
JApplet. setLayeredPane(JLayeredPane layeredPane)
Deprecated.Sets the layeredPane property.void
JDialog. setLayeredPane(JLayeredPane layeredPane)
Sets thelayeredPane
property.void
JFrame. setLayeredPane(JLayeredPane layeredPane)
Sets thelayeredPane
property.void
JInternalFrame. setLayeredPane(JLayeredPane layered)
Sets thisJInternalFrame
'slayeredPane
property.void
JWindow. setLayeredPane(JLayeredPane layeredPane)
Sets thelayeredPane
property.void
JList. setLayoutOrientation(int layoutOrientation)
Defines the way list cells are layed out.void
JTree. setLeadSelectionPath(TreePath newPath)
Sets the path identifies as the lead.void
JComboBox. setLightWeightPopupEnabled(boolean aFlag)
Sets thelightWeightPopupEnabled
property, which provides a hint as to whether or not a lightweightComponent
should be used to contain theJComboBox
, versus a heavyweightComponent
such as aPanel
or aWindow
.void
JPopupMenu. setLightWeightPopupEnabled(boolean aFlag)
Sets the value of thelightWeightPopupEnabled
property, which by default istrue
.void
JTextArea. setLineWrap(boolean wrap)
Sets the line-wrapping policy of the text area.void
JPopupMenu. setLocation(int x, int y)
Sets the location of the upper left corner of the popup menu using x, y coordinates.void
JSlider. setMajorTickSpacing(int n)
This method sets the major tick spacing.void
AbstractButton. setMargin(Insets m)
Sets space for margin between the button's border and the label.void
JMenuBar. setMargin(Insets m)
Sets the margin between the menubar's border and its menus.void
JToolBar. setMargin(Insets m)
Sets the margin between the tool bar's border and its buttons.void
JInternalFrame. setMaximizable(boolean b)
Sets themaximizable
property, which determines whether theJInternalFrame
can be maximized by some user action.void
JInternalFrame. setMaximum(boolean b)
Maximizes and restores this internal frame.void
JProgressBar. setMaximum(int n)
Sets the progress bar's maximum value (stored in the progress bar's data model) ton
.void
JScrollBar. setMaximum(int maximum)
Sets the model's maximum property.void
JSlider. setMaximum(int maximum)
Sets the slider's maximum value tomaximum
.void
JComboBox. setMaximumRowCount(int count)
Sets the maximum number of rows theJComboBox
displays.void
JComponent. setMaximumSize(Dimension maximumSize)
Sets the maximum size of this component to a constant value.void
JOptionPane. setMessage(Object newMessage)
Sets the option pane's message-object.void
JOptionPane. setMessageType(int newType)
Sets the option pane's message type.void
JProgressBar. setMinimum(int n)
Sets the progress bar's minimum value (stored in the progress bar's data model) ton
.void
JScrollBar. setMinimum(int minimum)
Sets the model's minimum property.void
JSlider. setMinimum(int minimum)
Sets the slider's minimum value tominimum
.void
JComponent. setMinimumSize(Dimension minimumSize)
Sets the minimum size of this component to a constant value.void
JSlider. setMinorTickSpacing(int n)
This method sets the minor tick spacing.void
AbstractButton. setMnemonic(char mnemonic)
This method is now obsolete, please usesetMnemonic(int)
to set the mnemonic for a button.void
AbstractButton. setMnemonic(int mnemonic)
Sets the keyboard mnemonic on the current model.void
JTabbedPane. setMnemonicAt(int tabIndex, int mnemonic)
Sets the keyboard mnemonic for accessing the specified tab.void
AbstractButton. setModel(ButtonModel newModel)
Sets the model that this button represents.void
JComboBox. setModel(ComboBoxModel<E> aModel)
Sets the data model that theJComboBox
uses to obtain the list of items.void
JList. setModel(ListModel<E> model)
Sets the model that represents the contents or "value" of the list, notifies property change listeners, and then clears the list's selection.void
JProgressBar. setModel(BoundedRangeModel newModel)
Sets the data model used by theJProgressBar
.void
JScrollBar. setModel(BoundedRangeModel newModel)
Sets the model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.void
JSlider. setModel(BoundedRangeModel newModel)
Sets theBoundedRangeModel
that handles the slider's three fundamental properties: minimum, maximum, value.void
JSpinner. setModel(SpinnerModel model)
Changes the model that represents the value of this spinner.void
JTabbedPane. setModel(SingleSelectionModel model)
Sets the model to be used with this tabbedpane.void
JTable. setModel(TableModel dataModel)
Sets the data model for this table todataModel
and registers with it for listener notifications from the new data model.void
JTree. setModel(TreeModel newModel)
Sets theTreeModel
that will provide the data.void
JFileChooser. setMultiSelectionEnabled(boolean b)
Sets the file chooser to allow multiple file selections.void
JSplitPane. setOneTouchExpandable(boolean newValue)
Sets the value of theoneTouchExpandable
property, which must betrue
for theJSplitPane
to provide a UI widget on the divider to quickly expand/collapse the divider.void
JComponent. setOpaque(boolean isOpaque)
If true the component paints every pixel within its bounds.void
JOptionPane. setOptions(Object[] newOptions)
Sets the options this pane displays.void
JOptionPane. setOptionType(int newType)
Sets the options to display.void
JProgressBar. setOrientation(int newOrientation)
Sets the progress bar's orientation tonewOrientation
, which must beSwingConstants.VERTICAL
orSwingConstants.HORIZONTAL
.void
JScrollBar. setOrientation(int orientation)
Set the scrollbar's orientation to either VERTICAL or HORIZONTAL.void
JSeparator. setOrientation(int orientation)
Sets the orientation of the separator.void
JSlider. setOrientation(int orientation)
Set the slider's orientation to eitherSwingConstants.VERTICAL
orSwingConstants.HORIZONTAL
.void
JSplitPane. setOrientation(int orientation)
Sets the orientation, or how the splitter is divided.void
JToolBar. setOrientation(int o)
Sets the orientation of the tool bar.void
JEditorPane. setPage(URL page)
Sets the current URL being displayed.void
JSlider. setPaintLabels(boolean b)
Determines whether labels are painted on the slider.void
JSlider. setPaintTicks(boolean b)
Determines whether tick marks are painted on the slider.void
JSlider. setPaintTrack(boolean b)
Determines whether the track is painted on the slider.void
JMenu. setPopupMenuVisible(boolean b)
Sets the visibility of the menu's popup.void
JPopupMenu. setPopupSize(int width, int height)
Sets the size of the Popup window to the specified width and height.void
JPopupMenu. setPopupSize(Dimension d)
Sets the size of the Popup window using aDimension
object.void
JTable. setPreferredScrollableViewportSize(Dimension size)
Sets the preferred size of the viewport for this table.void
JComponent. setPreferredSize(Dimension preferredSize)
Sets the preferred size of this component.void
AbstractButton. setPressedIcon(Icon pressedIcon)
Sets the pressed icon for the button.void
JColorChooser. setPreviewPanel(JComponent preview)
Sets the current preview panel.void
JList. setPrototypeCellValue(E prototypeCellValue)
Sets theprototypeCellValue
property, and then (if the new value isnon-null
), computes thefixedCellWidth
andfixedCellHeight
properties by requesting the cell renderer component for the given value (and index 0) from the cell renderer, and using that component's preferred size.void
JComboBox. setPrototypeDisplayValue(E prototypeDisplayValue)
Sets the prototype display value used to calculate the size of the display for the UI portion.void
JComboBox. setRenderer(ListCellRenderer<? super E> aRenderer)
Sets the renderer that paints the list items and the item selected from the list in the JComboBox field.void
JInternalFrame. setResizable(boolean b)
Sets whether theJInternalFrame
can be resized by some user action.void
JSplitPane. setResizeWeight(double value)
Specifies how to distribute extra space when the size of the split pane changes.void
JSplitPane. setRightComponent(Component comp)
Sets the component to the right (or below) the divider.void
JToolBar. setRollover(boolean rollover)
Sets the rollover state of this toolbar.void
AbstractButton. setRolloverEnabled(boolean b)
Sets therolloverEnabled
property, which must betrue
for rollover effects to occur.void
AbstractButton. setRolloverIcon(Icon rolloverIcon)
Sets the rollover icon for the button.void
AbstractButton. setRolloverSelectedIcon(Icon rolloverSelectedIcon)
Sets the rollover selected icon for the button.protected void
JApplet. setRootPaneCheckingEnabled(boolean enabled)
Deprecated.Sets whether calls toadd
andsetLayout
are forwarded to thecontentPane
.protected void
JDialog. setRootPaneCheckingEnabled(boolean enabled)
Sets whether calls toadd
andsetLayout
are forwarded to thecontentPane
.protected void
JFrame. setRootPaneCheckingEnabled(boolean enabled)
Sets whether calls toadd
andsetLayout
are forwarded to thecontentPane
.protected void
JInternalFrame. setRootPaneCheckingEnabled(boolean enabled)
Sets whether calls toadd
andsetLayout
are forwarded to thecontentPane
.protected void
JWindow. setRootPaneCheckingEnabled(boolean enabled)
Sets whether calls toadd
andsetLayout
are forwarded to thecontentPane
.void
JTree. setRootVisible(boolean rootVisible)
Determines whether or not the root node from theTreeModel
is visible.void
JScrollPane. setRowHeader(JViewport rowHeader)
Removes the old rowHeader, if it exists; if the new rowHeader isn'tnull
, syncs the y coordinate of its viewPosition with the viewport (if there is one) and then adds it to the scroll pane.void
JTable. setRowHeight(int rowHeight)
Sets the height, in pixels, of all cells torowHeight
, revalidates, and repaints.void
JTable. setRowHeight(int row, int rowHeight)
Sets the height forrow
torowHeight
, revalidates, and repaints.void
JTree. setRowHeight(int rowHeight)
Sets the height of each cell, in pixels.void
JTable. setRowMargin(int rowMargin)
Sets the amount of empty space between cells in adjacent rows.void
JTextArea. setRows(int rows)
Sets the number of rows for this TextArea.void
JTable. setRowSelectionAllowed(boolean rowSelectionAllowed)
Sets whether the rows in this model can be selected.void
JTable. setRowSorter(RowSorter<? extends TableModel> sorter)
Sets theRowSorter
.void
JViewport. setScrollMode(int mode)
Used to control the method of scrolling the viewport contents.void
JTree. setScrollsOnExpand(boolean newValue)
Sets thescrollsOnExpand
property, which determines whether the tree might scroll to show previously hidden children.void
JInternalFrame. setSelected(boolean selected)
Selects or deselects the internal frame if it's showing.void
JMenu. setSelected(boolean b)
Sets the selection status of the menu.void
JPopupMenu. setSelected(Component sel)
Sets the currently selected component, This will result in a change to the selection model.void
JTabbedPane. setSelectedComponent(Component c)
Sets the selected component for this tabbedpane.void
JFileChooser. setSelectedFile(File file)
Sets the selected file.void
JFileChooser. setSelectedFiles(File[] selectedFiles)
Sets the list of selected files if the file chooser is set to allow multiple selection.void
AbstractButton. setSelectedIcon(Icon selectedIcon)
Sets the selected icon for the button.void
JComboBox. setSelectedIndex(int anIndex)
Selects the item at indexanIndex
.void
JList. setSelectedIndex(int index)
Selects a single cell.void
JTabbedPane. setSelectedIndex(int index)
Sets the selected index for this tabbedpane.void
JComboBox. setSelectedItem(Object anObject)
Sets the selected item in the combo box display area to the object in the argument.void
JList. setSelectionBackground(Color selectionBackground)
Sets the color used to draw the background of selected items, which cell renderers can use fill selected cells.void
JTable. setSelectionBackground(Color selectionBackground)
Sets the background color for selected cells.void
JList. setSelectionForeground(Color selectionForeground)
Sets the color used to draw the foreground of selected items, which cell renderers can use to render text and graphics.void
JTable. setSelectionForeground(Color selectionForeground)
Sets the foreground color for selected cells.void
JList. setSelectionMode(int selectionMode)
Sets the selection mode for the list.void
JTable. setSelectionMode(int selectionMode)
Sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.void
JColorChooser. setSelectionModel(ColorSelectionModel newModel)
Sets the model containing the selected color.void
JList. setSelectionModel(ListSelectionModel selectionModel)
Sets theselectionModel
for the list to a non-null
ListSelectionModel
implementation.void
JMenuBar. setSelectionModel(SingleSelectionModel model)
Sets the model object to handle single selections.void
JPopupMenu. setSelectionModel(SingleSelectionModel model)
Sets the model object to handle single selections.void
JTable. setSelectionModel(ListSelectionModel selectionModel)
Sets the row selection model for this table toselectionModel
and registers for listener notifications from the new selection model.void
JTree. setSelectionModel(TreeSelectionModel selectionModel)
Sets the tree's selection model.void
JOptionPane. setSelectionValues(Object[] newValues)
Sets the input selection values for a pane that provides the user with a list of items to choose from.void
JTable. setShowGrid(boolean showGrid)
Sets whether the table draws grid lines around cells.void
JTable. setShowHorizontalLines(boolean showHorizontalLines)
Sets whether the table draws horizontal lines between cells.void
JTree. setShowsRootHandles(boolean newValue)
Sets the value of theshowsRootHandles
property, which specifies whether the node handles should be displayed.void
JTable. setShowVerticalLines(boolean showVerticalLines)
Sets whether the table draws vertical lines between cells.void
JSlider. setSnapToTicks(boolean b)
Specifying true makes the knob (and the data value it represents) resolve to the closest tick mark next to where the user positioned the knob.void
JCheckBoxMenuItem. setState(boolean b)
Sets the selected-state of the item.void
JProgressBar. setString(String s)
Sets the value of the progress string.void
JProgressBar. setStringPainted(boolean b)
Sets the value of thestringPainted
property, which determines whether the progress bar should render a progress string.void
JTabbedPane. setTabComponentAt(int index, Component component)
Sets the component that is responsible for rendering the title for the specified tab.void
JTabbedPane. setTabLayoutPolicy(int tabLayoutPolicy)
Sets the policy which the tabbedpane will use in laying out the tabs when all the tabs will not fit within a single run.void
JTable. setTableHeader(JTableHeader tableHeader)
Sets thetableHeader
working with thisJTable
tonewHeader
.void
JTabbedPane. setTabPlacement(int tabPlacement)
Sets the tab placement for this tabbedpane.void
JTextArea. setTabSize(int size)
Sets the number of characters to expand tabs to.void
AbstractButton. setText(String text)
Sets the button's text.void
JEditorPane. setText(String t)
Sets the text of thisTextComponent
to the specified content, which is expected to be in the format of the content type of this editor.void
JLabel. setText(String text)
Defines the single line of text this component will display.void
JToolTip. setTipText(String tipText)
Sets the text to show when the tool tip is displayed.void
JInternalFrame. setTitle(String title)
Sets theJInternalFrame
title.void
JTabbedPane. setTitleAt(int index, String title)
Sets the title atindex
totitle
which can benull
.void
JTree. setToggleClickCount(int clickCount)
Sets the number of mouse clicks before a node will expand or close.void
JComponent. setToolTipText(String text)
Registers the text to display in a tool tip.void
JTabbedPane. setToolTipTextAt(int index, String toolTipText)
Sets the tooltip text atindex
totoolTipText
which can benull
.void
JSplitPane. setTopComponent(Component comp)
Sets the component above, or to the left of the divider.void
JApplet. setTransferHandler(TransferHandler newHandler)
Deprecated.Sets thetransferHandler
property, which is a mechanism to support transfer of data into this component.void
JComponent. setTransferHandler(TransferHandler newHandler)
Sets theTransferHandler
, which provides support for transfer of data into and out of this component via cut/copy/paste and drag and drop.void
JDialog. setTransferHandler(TransferHandler newHandler)
Sets thetransferHandler
property, which is a mechanism to support transfer of data into this component.void
JFrame. setTransferHandler(TransferHandler newHandler)
Sets thetransferHandler
property, which is a mechanism to support transfer of data into this component.void
JWindow. setTransferHandler(TransferHandler newHandler)
Sets thetransferHandler
property, which is a mechanism to support transfer of data into this component.void
AbstractButton. setUI(ButtonUI ui)
Sets the L&F object that renders this component.void
JColorChooser. setUI(ColorChooserUI ui)
Sets the L&F object that renders this component.void
JComboBox. setUI(ComboBoxUI ui)
Sets the L&F object that renders this component.protected void
JComponent. setUI(ComponentUI newUI)
Sets the look and feel delegate for this component.void
JDesktopPane. setUI(DesktopPaneUI ui)
Sets the L&F object that renders this component.void
JInternalFrame. setUI(InternalFrameUI ui)
Sets the UI delegate for thisJInternalFrame
.void
JLabel. setUI(LabelUI ui)
Sets the L&F object that renders this component.void
JList. setUI(ListUI ui)
Sets theListUI
, the look and feel object that renders this component.void
JMenuBar. setUI(MenuBarUI ui)
Sets the L&F object that renders this component.void
JMenuItem. setUI(MenuItemUI ui)
Sets the look and feel object that renders this component.void
JOptionPane. setUI(OptionPaneUI ui)
Sets the UI object which implements the L&F for this component.void
JPanel. setUI(PanelUI ui)
Sets the look and feel (L&F) object that renders this component.void
JPopupMenu. setUI(PopupMenuUI ui)
Sets the L&F object that renders this component.void
JProgressBar. setUI(ProgressBarUI ui)
Sets the look-and-feel object that renders this component.void
JRootPane. setUI(RootPaneUI ui)
Sets the L&F object that renders this component.void
JScrollBar. setUI(ScrollBarUI ui)
Sets the L&F object that renders this component.void
JSeparator. setUI(SeparatorUI ui)
Sets the L&F object that renders this component.void
JSlider. setUI(SliderUI ui)
Sets the UI object which implements the L&F for this component.void
JTabbedPane. setUI(TabbedPaneUI ui)
Sets the UI object which implements the L&F for this component.void
JTable. setUI(TableUI ui)
Sets the L&F object that renders this component and repaints.void
JToolBar. setUI(ToolBarUI ui)
Sets the L&F object that renders this component.void
JTree. setUI(TreeUI ui)
Sets the L&F object that renders this component.void
JViewport. setUI(ViewportUI ui)
Sets the L&F object that renders this component.void
JScrollBar. setUnitIncrement(int unitIncrement)
Sets the unitIncrement property.void
JTable. setUpdateSelectionOnSort(boolean update)
Specifies whether the selection should be updated after sorting.void
JFormattedTextField. setValue(Object value)
Sets the value that will be formatted by anAbstractFormatter
obtained from the currentAbstractFormatterFactory
.void
JOptionPane. setValue(Object newValue)
Sets the value the user has chosen.void
JProgressBar. setValue(int n)
Sets the progress bar's current value ton
.void
JScrollBar. setValue(int value)
Sets the scrollbar's value.void
JSlider. setValue(int n)
Sets the slider's current value ton
.void
JScrollBar. setValueIsAdjusting(boolean b)
Sets the model's valueIsAdjusting property.void
JSlider. setValueIsAdjusting(boolean b)
Sets the model'svalueIsAdjusting
property.void
JComponent. setVerifyInputWhenFocusTarget(boolean verifyInputWhenFocusTarget)
Sets the value to indicate whether input verifier for the current focus owner will be called before this component requests focus.void
AbstractButton. setVerticalAlignment(int alignment)
Sets the vertical alignment of the icon and text.void
JLabel. setVerticalAlignment(int alignment)
Sets the alignment of the label's contents along the Y axis.void
JScrollPane. setVerticalScrollBar(JScrollBar verticalScrollBar)
Adds the scrollbar that controls the viewports vertical view position to the scrollpane.void
JScrollPane. setVerticalScrollBarPolicy(int policy)
Determines when the vertical scrollbar appears in the scrollpane.void
AbstractButton. setVerticalTextPosition(int textPosition)
Sets the vertical position of the text relative to the icon.void
JLabel. setVerticalTextPosition(int textPosition)
Sets the vertical position of the label's text, relative to its image.void
JScrollPane. setViewport(JViewport viewport)
Removes the old viewport (if there is one); forces the viewPosition of the new viewport to be in the +x,+y quadrant; syncs up the row and column headers (if there are any) with the new viewport; and finally syncs the scrollbars and headers with the new viewport.void
JScrollPane. setViewportBorder(Border viewportBorder)
Adds a border around the viewport.void
JComponent. setVisible(boolean aFlag)
Makes the component visible or invisible.void
JPopupMenu. setVisible(boolean b)
Sets the visibility of the popup menu.void
JScrollBar. setVisibleAmount(int extent)
Set the model's extent property.void
JList. setVisibleRowCount(int visibleRowCount)
Sets thevisibleRowCount
property, which has different meanings depending on the layout orientation: For aVERTICAL
layout orientation, this sets the preferred number of rows to display without requiring scrolling; for other orientations, it affects the wrapping of cells.void
JTree. setVisibleRowCount(int newCount)
Sets the number of rows that are to be displayed.void
JOptionPane. setWantsInput(boolean newValue)
Sets thewantsInput
property.void
JScrollPane. setWheelScrollingEnabled(boolean handleWheel)
Enables/disables scrolling in response to movement of the mouse wheel.void
JRootPane. setWindowDecorationStyle(int windowDecorationStyle)
Sets the type of Window decorations (such as borders, widgets for closing a Window, title ...) theJRootPane
should provide.void
JTextArea. setWrapStyleWord(boolean word)
Sets the style of wrapping used if the text area is wrapping lines. -
Uses of BeanProperty in javax.swing.colorchooser
Methods in javax.swing.colorchooser with annotations of type BeanProperty Modifier and Type Method Description void
AbstractColorChooserPanel. setColorTransparencySelectionEnabled(boolean b)
Sets whether color chooser panel allows to select the transparency (alpha value) of a color. -
Uses of BeanProperty in javax.swing.table
Methods in javax.swing.table with annotations of type BeanProperty Modifier and Type Method Description void
TableColumn. setCellEditor(TableCellEditor cellEditor)
Sets the editor to used by when a cell in this column is edited.void
TableColumn. setCellRenderer(TableCellRenderer cellRenderer)
Sets theTableCellRenderer
used byJTable
to draw individual values for this column.void
JTableHeader. setColumnModel(TableColumnModel columnModel)
Sets the column model for this table tonewModel
and registers for listener notifications from the new column model.void
TableColumn. setHeaderRenderer(TableCellRenderer headerRenderer)
Sets theTableCellRenderer
used to draw theTableColumn
's header toheaderRenderer
.void
TableColumn. setHeaderValue(Object headerValue)
Sets theObject
whose string representation will be used as the value for theheaderRenderer
.void
TableColumn. setIdentifier(Object identifier)
Sets theTableColumn
's identifier toanIdentifier
.void
TableColumn. setMaxWidth(int maxWidth)
Sets theTableColumn
's maximum width tomaxWidth
or, ifmaxWidth
is less than the minimum width, to the minimum width.void
TableColumn. setMinWidth(int minWidth)
Sets theTableColumn
's minimum width tominWidth
, adjusting the new minimum width if necessary to ensure that 0 <=minWidth
<=maxWidth
.void
TableColumn. setModelIndex(int modelIndex)
Sets the model index for this column.void
TableColumn. setPreferredWidth(int preferredWidth)
Sets this column's preferred width topreferredWidth
.void
JTableHeader. setReorderingAllowed(boolean reorderingAllowed)
Sets whether the user can drag column headers to reorder columns.void
TableColumn. setResizable(boolean isResizable)
Sets whether this column can be resized.void
JTableHeader. setResizingAllowed(boolean resizingAllowed)
Sets whether the user can resize columns by dragging between headers.void
JTableHeader. setTable(JTable table)
Sets the table associated with this header.void
TableColumn. setWidth(int width)
This method should not be used to set the widths of columns in theJTable
, usesetPreferredWidth
instead. -
Uses of BeanProperty in javax.swing.text
Methods in javax.swing.text with annotations of type BeanProperty Modifier and Type Method Description AccessibleContext
JTextComponent. getAccessibleContext()
Gets theAccessibleContext
associated with thisJTextComponent
.Action[]
JTextComponent. getActions()
Fetches the command list for the editor.CaretListener[]
JTextComponent. getCaretListeners()
Returns an array of all the caret listeners registered on this text component.JTextComponent.DropLocation
JTextComponent. getDropLocation()
Returns the location that this component should visually indicate as the drop location during a DnD operation over the component, ornull
if no location is to currently be shown.Dimension
JTextComponent. getPreferredScrollableViewportSize()
Returns the preferred size of the viewport for a view component.boolean
JTextComponent. getScrollableTracksViewportHeight()
Returns true if a viewport should always force the height of thisScrollable
to match the height of the viewport.boolean
JTextComponent. getScrollableTracksViewportWidth()
Returns true if a viewport should always force the width of thisScrollable
to match the width of the viewport.String
JTextComponent. getSelectedText()
Returns the selected text contained in thisTextComponent
.void
JTextComponent. setCaret(Caret c)
Sets the caret to be used.void
JTextComponent. setCaretColor(Color c)
Sets the current color used to render the caret.void
JTextComponent. setCaretPosition(int position)
Sets the position of the text insertion caret for theTextComponent
.void
JTextComponent. setDisabledTextColor(Color c)
Sets the current color used to render the disabled text.void
JTextComponent. setDocument(Document doc)
Associates the editor with a text document.void
JTextComponent. setDragEnabled(boolean b)
Turns on or off automatic drag handling.void
JTextComponent. setEditable(boolean b)
Sets the specified boolean to indicate whether or not thisTextComponent
should be editable.void
JTextComponent. setFocusAccelerator(char aKey)
Sets the key accelerator that will cause the receiving text component to get the focus.void
JTextComponent. setHighlighter(Highlighter h)
Sets the highlighter to be used.void
JTextComponent. setKeymap(Keymap map)
Sets the keymap to use for binding events to actions.void
JTextComponent. setMargin(Insets m)
Sets margin space between the text component's border and its text.void
JTextComponent. setSelectedTextColor(Color c)
Sets the current color used to render the selected text.void
JTextComponent. setSelectionColor(Color c)
Sets the current color used to render the selection.void
JTextComponent. setSelectionEnd(int selectionEnd)
Sets the selection end to the specified position.void
JTextComponent. setSelectionStart(int selectionStart)
Sets the selection start to the specified position.void
JTextComponent. setText(String t)
Sets the text of thisTextComponent
to the specified text. -
Uses of BeanProperty in javax.swing.tree
Methods in javax.swing.tree with annotations of type BeanProperty Modifier and Type Method Description void
DefaultTreeCellEditor.DefaultTextField. setBorder(Border border)
Sets the border of this component.void
VariableHeightLayoutCache. setModel(TreeModel newModel)
Sets theTreeModel
that will provide the data.void
AbstractLayoutCache. setRootVisible(boolean rootVisible)
Determines whether or not the root node from theTreeModel
is visible.void
VariableHeightLayoutCache. setRootVisible(boolean rootVisible)
Determines whether or not the root node from theTreeModel
is visible.void
AbstractLayoutCache. setRowHeight(int rowHeight)
Sets the height of each cell.void
VariableHeightLayoutCache. setRowHeight(int rowHeight)
Sets the height of each cell.