Uses of Annotation Interface
java.beans.BeanProperty
Packages that use BeanProperty
Package
Description
Contains all of the classes for creating user interfaces and for painting
graphics and images.
Defines a contract between user-interface components and an assistive
technology that provides access to those components.
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Contains classes and interfaces used by the
JColorChooser component.Provides classes and interfaces for dealing with
javax.swing.JTable.Provides classes and interfaces that deal with editable and noneditable text
components.
Provides classes and interfaces for dealing with
javax.swing.JTree.-
Uses of BeanProperty in java.awt
Methods in java.awt with annotations of type BeanPropertyModifier and TypeMethodDescriptionButton.getAccessibleContext()Gets theAccessibleContextassociated with thisButton. -
Uses of BeanProperty in javax.accessibility
Methods in javax.accessibility with annotations of type BeanPropertyModifier and TypeMethodDescriptionvoidAccessibleContext.setAccessibleDescription(String s) Sets the accessible description of this object.voidAccessibleContext.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 BeanPropertyModifier and TypeMethodDescriptionvoidJFileChooser.addChoosableFileFilter(FileFilter filter) Adds a filter to the list of user choosable file filters.JFileChooser.getAcceptAllFileFilter()Returns theAcceptAllfile filter.Box.getAccessibleContext()Gets the AccessibleContext associated with this Box.ImageIcon.getAccessibleContext()Gets the AccessibleContext associated with this ImageIcon.JButton.getAccessibleContext()Gets theAccessibleContextassociated with thisJButton.JCheckBox.getAccessibleContext()Gets the AccessibleContext associated with this JCheckBox.JCheckBoxMenuItem.getAccessibleContext()Gets the AccessibleContext associated with this JCheckBoxMenuItem.JColorChooser.getAccessibleContext()Gets the AccessibleContext associated with this JColorChooser.JComboBox.getAccessibleContext()Gets the AccessibleContext associated with this JComboBox.JDesktopPane.getAccessibleContext()Gets theAccessibleContextassociated with thisJDesktopPane.JEditorPane.getAccessibleContext()Gets the AccessibleContext associated with this JEditorPane.JFileChooser.getAccessibleContext()Gets the AccessibleContext associated with this JFileChooser.JInternalFrame.getAccessibleContext()Gets theAccessibleContextassociated with thisJInternalFrame.JLabel.getAccessibleContext()Get the AccessibleContext of this objectJLayeredPane.getAccessibleContext()Gets the AccessibleContext associated with this JLayeredPane.JList.getAccessibleContext()Gets theAccessibleContextassociated with thisJList.JMenu.getAccessibleContext()Gets the AccessibleContext associated with this JMenu.JMenuBar.getAccessibleContext()Gets the AccessibleContext associated with this JMenuBar.JMenuItem.getAccessibleContext()Returns theAccessibleContextassociated with thisJMenuItem.JOptionPane.getAccessibleContext()Returns theAccessibleContextassociated with this JOptionPane.JPanel.getAccessibleContext()Gets the AccessibleContext associated with this JPanel.JPasswordField.getAccessibleContext()Returns theAccessibleContextassociated with thisJPasswordField.JPopupMenu.getAccessibleContext()Gets the AccessibleContext associated with this JPopupMenu.JProgressBar.getAccessibleContext()Gets theAccessibleContextassociated with thisJProgressBar.JRadioButton.getAccessibleContext()Gets the AccessibleContext associated with this JRadioButton.JRadioButtonMenuItem.getAccessibleContext()Gets the AccessibleContext associated with this JRadioButtonMenuItem.JScrollBar.getAccessibleContext()Gets the AccessibleContext associated with this JScrollBar.JScrollPane.getAccessibleContext()Gets the AccessibleContext associated with this JScrollPane.JSeparator.getAccessibleContext()Gets the AccessibleContext associated with this JSeparator.JSlider.getAccessibleContext()Gets the AccessibleContext associated with this JSlider.JSpinner.getAccessibleContext()Gets theAccessibleContextfor theJSpinnerJSplitPane.getAccessibleContext()Gets the AccessibleContext associated with this JSplitPane.JTabbedPane.getAccessibleContext()Gets the AccessibleContext associated with this JTabbedPane.JTable.getAccessibleContext()Gets the AccessibleContext associated with this JTable.JTextArea.getAccessibleContext()Gets the AccessibleContext associated with this JTextArea.JTextField.getAccessibleContext()Gets theAccessibleContextassociated with thisJTextField.JToggleButton.getAccessibleContext()Gets the AccessibleContext associated with this JToggleButton.JToolBar.getAccessibleContext()Gets the AccessibleContext associated with this JToolBar.JTree.getAccessibleContext()Gets the AccessibleContext associated with this JTree.AbstractButton.getActionListeners()Returns an array of all theActionListeners added to this AbstractButton with addActionListener().JComboBox.getActionListeners()Returns an array of all theActionListeners added to this JComboBox with addActionListener().JFileChooser.getActionListeners()Returns an array of all the action listeners registered on this file chooser.JTextField.getActionListeners()Returns an array of all theActionListeners 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.JScrollBar.getAdjustmentListeners()Returns an array of all theAdjustmentListeners added to this JScrollBar with addAdjustmentListener().JDesktopPane.getAllFrames()Returns allJInternalFramescurrently displayed in the desktop.JComponent.getAncestorListeners()Returns an array of all the ancestor listeners registered on this component.intJList.getAnchorSelectionIndex()Returns the anchor selection index.JComponent.getBaselineResizeBehavior()Returns an enum indicating how the baseline of the component changes as the size changes.AbstractButton.getChangeListeners()Returns an array of all theChangeListeners added to this AbstractButton with addChangeListener().JProgressBar.getChangeListeners()Returns an array of all theChangeListeners added to this progress bar withaddChangeListener.JSlider.getChangeListeners()Returns an array of all theChangeListeners added to this JSlider with addChangeListener().JSpinner.getChangeListeners()Returns an array of all theChangeListeners added to this JSpinner with addChangeListener().JTabbedPane.getChangeListeners()Returns an array of all theChangeListeners added to thisJTabbedPanewithaddChangeListener.JTextPane.getCharacterAttributes()Fetches the character attributes in effect at the current location of the caret, ornull.JFileChooser.getChoosableFileFilters()Gets the list of user choosable file filters.intJTable.getColumnCount()Returns the number of columns in the column model.JInternalFrame.getDesktopPane()Convenience method that searches the ancestor hierarchy for aJDesktopinstance.final JList.DropLocationJList.getDropLocation()Returns the location that this component should visually indicate as the drop location during a DnD operation over the component, ornullif no location is to currently be shown.final JTable.DropLocationJTable.getDropLocation()Returns the location that this component should visually indicate as the drop location during a DnD operation over the component, ornullif no location is to currently be shown.final JTree.DropLocationJTree.getDropLocation()Returns the location that this component should visually indicate as the drop location during a DnD operation over the component, ornullif no location is to currently be shown.JTree.getEditingPath()Returns the path to the element that is currently being edited.JTable.getEditorComponent()Returns the component that is handling the editing session.intJList.getFirstVisibleIndex()Returns the smallest list index that is currently visible.final ContainerJInternalFrame.getFocusCycleRootAncestor()Always returnsnullbecauseJInternalFrames must always be roots of a focus traversal cycle.JFormattedTextField.getFormatter()Returns theAbstractFormatterthat is used to format and parse the current value.JApplet.getGraphics()Deprecated, for removal: This API element is subject to removal in a future version.Creates a graphics context for this component.JComponent.getGraphics()Returns this component's graphics context, which lets you draw on a component.JDialog.getGraphics()Creates a graphics context for this component.JFrame.getGraphics()Creates a graphics context for this component.JWindow.getGraphics()Creates a graphics context for this component.intJComponent.getHeight()Returns the current height of this component.JTextField.getHorizontalVisibility()Gets the visibility of the text field.JEditorPane.getHyperlinkListeners()Returns an array of all theHyperLinkListeners added to this JEditorPane with addHyperlinkListener().JTextPane.getInputAttributes()Gets the input attributes for the pane.JComponent.getInsets()If a border has been set on this component, returns the border's insets; otherwise callssuper.getInsets.final InsetsReturns anInsetsobject containing thisJViewports inset values.JInternalFrame.getInternalFrameListeners()Returns an array of all theInternalFrameListeners added to thisJInternalFramewithaddInternalFrameListener.intJComboBox.getItemCount()Returns the number of items in the list.intJMenu.getItemCount()Returns the number of items on the menu, including separators.AbstractButton.getItemListeners()Returns an array of all theItemListeners added to this AbstractButton with addItemListener().JComboBox.getItemListeners()Returns an array of all theItemListeners added to this JComboBox with addItemListener().JInternalFrame.getLastCursor()Returns the lastCursorthat was set by thesetCursormethod that is not a resizableCursor.JTree.getLastSelectedPathComponent()Returns the last path component of the selected path.intJList.getLastVisibleIndex()Returns the largest list index that is currently visible.intJList.getLeadSelectionIndex()Returns the lead selection index.intJTree.getLeadSelectionRow()Returns the row index corresponding to the lead path.JSplitPane.getLeftComponent()Returns the component to the left (or above) the divider.intJTextArea.getLineCount()Determines the number of lines contained in the area.JList.getListSelectionListeners()Returns an array of all theListSelectionListeners added to thisJListby way ofaddListSelectionListener.JPopupMenu.getMargin()Returns the margin, in pixels, between the popup menu's border and its containers.intJOptionPane.getMaxCharactersPerLineCount()Returns the maximum number of characters to place on a line in a message.intJSplitPane.getMaximumDividerLocation()Returns the maximum location of the divider from the look and feel implementation.intJList.getMaxSelectionIndex()Returns the largest selected cell index, or-1if the selection is empty.intJTree.getMaxSelectionRow()Returns the largest selected row.intJMenu.getMenuComponentCount()Returns the number of components on the menu.JMenu.getMenuComponents()Returns an array ofComponents of the menu's subcomponents.intJMenuBar.getMenuCount()Returns the number of items in the menu bar.JMenuItem.getMenuDragMouseListeners()Returns an array of all theMenuDragMouseListeners added to this JMenuItem with addMenuDragMouseListener().JMenuItem.getMenuKeyListeners()Returns an array of all theMenuKeyListeners added to this JMenuItem with addMenuKeyListener().JPopupMenu.getMenuKeyListeners()Returns an array of all theMenuKeyListeners added to this JPopupMenu with addMenuKeyListener().JMenu.getMenuListeners()Returns an array of all theMenuListeners added to this JMenu with addMenuListener().intJSplitPane.getMinimumDividerLocation()Returns the minimum location of the divider from the look and feel implementation.intJList.getMinSelectionIndex()Returns the smallest selected cell index, or-1if the selection is empty.intJTree.getMinSelectionRow()Returns the smallest selected row.JInternalFrame.getMostRecentFocusOwner()Returns the child component of thisJInternalFramethat will receive the focus when thisJInternalFrameis selected.JSpinner.getNextValue()Returns the object in the sequence that comes after the object returned bygetValue().JTextPane.getParagraphAttributes()Fetches the current paragraph attributes in effect at the location of the caret, ornullif none.char[]JPasswordField.getPassword()Returns the text contained in thisTextComponent.JTree.getPathForRow(int row) Returns the path for the specified row.doubleJProgressBar.getPercentComplete()Returns the percent complete for the progress bar.JMenu.getPopupMenu()Returns the popupmenu associated with this menu.JComboBox.getPopupMenuListeners()Returns an array of all thePopupMenuListeners added to this JComboBox with addPopupMenuListener().JPopupMenu.getPopupMenuListeners()Returns an array of all thePopupMenuListeners added to this JMenuItem with addPopupMenuListener().Computes the size of viewport needed to displayvisibleRowCountrows.JTextArea.getPreferredScrollableViewportSize()Returns the preferred size of the viewport if this component is embedded in a JScrollPane.Returns the preferred display size of aJTree.JSpinner.getPreviousValue()Returns the object in the sequence that comes before the object returned bygetValue().JComponent.getRegisteredKeyStrokes()Returns theKeyStrokesthat will initiate registered actions.JApplet.getRootPane()Deprecated, for removal: This API element is subject to removal in a future version.Returns the rootPane object for this applet.JComponent.getRootPane()Returns theJRootPaneancestor for this component.JDialog.getRootPane()Returns therootPaneobject for this dialog.JFrame.getRootPane()Returns therootPaneobject for this frame.JInternalFrame.getRootPane()Returns therootPaneobject for this internal frame.JWindow.getRootPane()Returns therootPaneobject for this window.intJTable.getRowCount()Returns the number of rows that can be shown in theJTable, given unlimited space.intJTree.getRowCount()Returns the number of viewable nodes.booleanJEditorPane.getScrollableTracksViewportHeight()Returns true if a viewport should always force the height of thisScrollableto match the height of the viewport.booleanReturnstrueif thisJListis displayed in aJViewportand the viewport is taller than the list's preferred height, or if the layout orientation isVERTICAL_WRAPandvisibleRowCount <= 0; otherwise returnsfalse.booleanJTable.getScrollableTracksViewportHeight()Returnsfalseto indicate that the height of the viewport does not determine the height of the table, unlessgetFillsViewportHeightistrueand the preferred height of the table is smaller than the viewport's height.booleanReturns 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.booleanJEditorPane.getScrollableTracksViewportWidth()Returns true if a viewport should always force the width of thisScrollableto match the width of the viewport.booleanJList.getScrollableTracksViewportWidth()Returnstrueif thisJListis displayed in aJViewportand the viewport is wider than the list's preferred width, or if the layout orientation isHORIZONTAL_WRAPandvisibleRowCount <= 0; otherwise returnsfalse.booleanJTable.getScrollableTracksViewportWidth()Returns false ifautoResizeModeis set toAUTO_RESIZE_OFF, which indicates that the width of the viewport does not determine the width of the table.booleanJTextArea.getScrollableTracksViewportWidth()Returns true if a viewport should always force the width of this Scrollable to match the width of the viewport.booleanJTree.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.intJTable.getSelectedColumn()Returns the index of the first selected column, -1 if no column is selected.intJTable.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 ornullif 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.intJTable.getSelectedRow()Returns the index of the first selected row, -1 if no row is selected.intJTable.getSelectedRowCount()Returns the number of selected rows.int[]JTable.getSelectedRows()Returns the indices of all selected rows.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.JList.getSelectedValuesList()Returns a list of all the selected items, in increasing order based on their indices in the list.intJTree.getSelectionCount()Returns the number of nodes selected.JMenu.getSubElements()Returns an array ofMenuElements containing the submenu for this menu component.JMenuBar.getSubElements()Implemented to be aMenuElement-- returns the menus in this menu bar.JMenuItem.getSubElements()This method returns an array containing the sub-menu components for this menu component.JPopupMenu.getSubElements()Returns an array ofMenuElements containing the submenu for this menu component.intJTabbedPane.getTabCount()Returns the number of tabs in thistabbedpane.intJTabbedPane.getTabRunCount()Returns the number of tab runs currently used to display the tabs.JComponent.getTopLevelAncestor()Returns the top-level ancestor of this component (either the containingWindoworApplet), ornullif this component has not been added to any container.JTree.getTreeExpansionListeners()Returns an array of all theTreeExpansionListeners added to this JTree with addTreeExpansionListener().JTree.getTreeSelectionListeners()Returns an array of all theTreeSelectionListeners added to this JTree with addTreeSelectionListener().JTree.getTreeWillExpandListeners()Returns an array of all theTreeWillExpandListeners added to this JTree with addTreeWillExpandListener().JFileChooser.getUI()Gets the UI object which implements the L&F for this component.JScrollPane.getUI()Returns the look and feel (L&F) object that renders this component.JSplitPane.getUI()Returns theSplitPaneUIthat is providing the current look and feel.JButton.getUIClassID()Returns a string that specifies the name of the L&F class that renders this component.JCheckBox.getUIClassID()Returns a string that specifies the name of the L&F class that renders this component.JCheckBoxMenuItem.getUIClassID()Returns the name of the L&F class that renders this component.JColorChooser.getUIClassID()Returns the name of the L&F class that renders this component.JComboBox.getUIClassID()Returns the name of the L&F class that renders this component.JComponent.getUIClassID()Returns theUIDefaultskey used to look up the name of theswing.plaf.ComponentUIclass that defines the look and feel for this component.JDesktopPane.getUIClassID()Returns the name of the L&F class that renders this component.JEditorPane.getUIClassID()Gets the class ID for the UI.JFileChooser.getUIClassID()Returns a string that specifies the name of the L&F class that renders this component.JFormattedTextField.getUIClassID()Gets the class ID for a UI.JInternalFrame.getUIClassID()Returns the name of the look-and-feel class that renders this component.JLabel.getUIClassID()Returns a string that specifies the name of the l&f class that renders this component.JList.getUIClassID()Returns"ListUI", theUIDefaultskey used to look up the name of thejavax.swing.plaf.ListUIclass that defines the look and feel for this component.JMenu.getUIClassID()Returns the name of the L&F class that renders this component.JMenuBar.getUIClassID()Returns the name of the L&F class that renders this component.JMenuItem.getUIClassID()Returns the suffix used to construct the name of the L&F class used to render this component.JOptionPane.getUIClassID()Returns the name of the UI class that implements the L&F for this component.JPanel.getUIClassID()Returns a string that specifies the name of the L&F class that renders this component.JPasswordField.getUIClassID()Returns the name of the L&F class that renders this component.JPopupMenu.getUIClassID()Returns the name of the L&F class that renders this component.JProgressBar.getUIClassID()Returns the name of the look-and-feel class that renders this component.JRadioButton.getUIClassID()Returns the name of the L&F class that renders this component.JRadioButtonMenuItem.getUIClassID()Returns the name of the L&F class that renders this component.JScrollBar.getUIClassID()Returns the name of the LookAndFeel class for this component.JScrollPane.getUIClassID()Returns the suffix used to construct the name of the L&F class used to render this component.JSeparator.getUIClassID()Returns the name of the L&F class that renders this component.JSlider.getUIClassID()Returns the name of the L&F class that renders this component.JSpinner.getUIClassID()Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component.JSplitPane.getUIClassID()Returns the name of the L&F class that renders this component.JTabbedPane.getUIClassID()Returns the name of the UI class that implements the L&F for this component.JTable.getUIClassID()Returns the suffix used to construct the name of the L&F class used to render this component.JTextArea.getUIClassID()Returns the class ID for the UI.JTextField.getUIClassID()Gets the class ID for a UI.JTextPane.getUIClassID()Returns the class ID for the UI.JToggleButton.getUIClassID()Returns a string that specifies the name of the l&f class that renders this component.JToolBar.getUIClassID()Returns the name of the L&F class that renders this component.JTree.getUIClassID()Returns the name of the L&F class that renders this component.JComponent.getVetoableChangeListeners()Returns an array of all the vetoable change listeners registered on this component.JScrollPane.getViewportBorderBounds()Returns the bounds of the viewport's border.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.final StringJInternalFrame.getWarningString()Gets the warning string that is displayed with this internal frame.intJComponent.getWidth()Returns the current width of this component.intJComponent.getX()Returns the current x coordinate of the component's origin.intJComponent.getY()Returns the current y coordinate of the component's origin.booleanJButton.isDefaultButton()Gets the value of thedefaultButtonproperty, which iftruemeans that this button is the current default button for itsJRootPane.booleanJFileChooser.isDirectorySelectionEnabled()Convenience call that determines if directories are selectable based on the current file selection mode.booleanJTable.isEditing()Returns true if a cell is being edited.booleanJTree.isEditing()Returns true if the tree is being edited.booleanJFormattedTextField.isEditValid()Returns true if the current value being edited is valid.booleanJFileChooser.isFileSelectionEnabled()Convenience call that determines if files are selectable based on the current file selection mode.booleanJTree.isFixedRowHeight()Returns true if the height of each display row is a fixed size.booleanJProgressBar.isIndeterminate()Returns the value of theindeterminateproperty.booleanJComponent.isManagingFocus()Deprecated.As of 1.4, replaced byComponent.setFocusTraversalKeys(int, Set)andContainer.setFocusCycleRoot(boolean).booleanJComponent.isOptimizedDrawingEnabled()Returns true if this component tiles its children -- that is, if it can guarantee that the children will not overlap.booleanJLayeredPane.isOptimizedDrawingEnabled()Returns false if components in the pane can overlap, which makes optimized drawing impossible.final booleanJComponent.isPaintingForPrint()Returnstrueif the current painting operation on this component is part of aprintoperation.booleanJComponent.isPaintingTile()Returns true if the component is currently painting a tile.booleanJMenuBar.isSelected()Returns true if the menu bar currently has a component selected.booleanJList.isSelectionEmpty()Returnstrueif nothing is selected, elsefalse.booleanJTree.isSelectionEmpty()Returns true if the selection is currently empty.booleanJMenu.isTearOff()Returns true if the menu can be torn off.booleanJMenu.isTopLevelMenu()Returns true if the menu is a 'top-level menu', that is, if it is the direct child of a menubar.booleanJScrollPane.isValidateRoot()Overridden to return true so that any calls torevalidateon any descendants of thisJScrollPanewill cause the entire tree beginning with thisJScrollPaneto be validated.booleanJSplitPane.isValidateRoot()Returns true, so that calls torevalidateon any descendant of thisJSplitPanewill cause a request to be queued that will validate theJSplitPaneand all its descendants.booleanJScrollPane.isWheelScrollingEnabled()Indicates whether or not scrolling will take place in response to the mouse wheel.voidJMenuItem.setAccelerator(KeyStroke keyStroke) Sets the key combination which invokes the menu item's action listeners without navigating the menu hierarchy.voidJFileChooser.setAcceptAllFileFilterUsed(boolean b) Determines whether theAcceptAll FileFilteris used as an available choice in the choosable filter list.voidJFileChooser.setAccessory(JComponent newAccessory) Sets the accessory component.voidSets theAction.voidSets theActionfor theActionEventsource.voidSets theActionfor theActionEventsource.voidJComponent.setAlignmentX(float alignmentX) Sets the horizontal alignment.voidJComponent.setAlignmentY(float alignmentY) Sets the vertical alignment.voidJTree.setAnchorSelectionPath(TreePath newPath) Sets the path identified as the anchor.voidJFileChooser.setApproveButtonMnemonic(int mnemonic) Sets the approve button's mnemonic using a numeric keycode.voidJFileChooser.setApproveButtonText(String approveButtonText) Sets the text used in theApproveButtonin theFileChooserUI.voidJFileChooser.setApproveButtonToolTipText(String toolTipText) Sets the tooltip text used in theApproveButton.voidJMenuItem.setArmed(boolean b) Identifies the menu item as "armed".voidJTable.setAutoCreateColumnsFromModel(boolean autoCreateColumnsFromModel) Sets this table'sautoCreateColumnsFromModelflag.voidJTable.setAutoCreateRowSorter(boolean autoCreateRowSorter) Specifies whether aRowSortershould be created for the table whenever its model changes.voidJTable.setAutoResizeMode(int mode) Sets the table's auto resize mode when the table is resized.voidJComponent.setAutoscrolls(boolean autoscrolls) Sets theautoscrollsproperty.voidJComponent.setBackground(Color bg) Sets the background color of this component.voidJTabbedPane.setBackgroundAt(int index, Color background) Sets the background color atindextobackgroundwhich can benull, in which case the tab's background color will default to the background color of thetabbedpane.voidJScrollBar.setBlockIncrement(int blockIncrement) Sets the blockIncrement property.voidSets the border of this component.voidAbstractButton.setBorderPainted(boolean b) Sets theborderPaintedproperty.voidJMenuBar.setBorderPainted(boolean b) Sets whether the border should be painted.voidJPopupMenu.setBorderPainted(boolean b) Sets whether the border should be painted.voidJProgressBar.setBorderPainted(boolean b) Sets theborderPaintedproperty, which istrueif the progress bar should paint its border.voidJToolBar.setBorderPainted(boolean b) Sets theborderPaintedproperty, which istrueif the border should be painted.voidJCheckBox.setBorderPaintedFlat(boolean b) Sets theborderPaintedFlatproperty, which gives a hint to the look and feel as to the appearance of the check box border.voidJSplitPane.setBottomComponent(Component comp) Sets the component below, or to the right of the divider.voidJTable.setCellEditor(TableCellEditor anEditor) Sets the active cell editor.voidJTree.setCellEditor(TreeCellEditor cellEditor) Sets the cell editor.voidJList.setCellRenderer(ListCellRenderer<? super E> cellRenderer) Sets the delegate that is used to paint each cell in the list.voidJTree.setCellRenderer(TreeCellRenderer x) Sets theTreeCellRendererthat will be used to draw each cell.voidJTable.setCellSelectionEnabled(boolean cellSelectionEnabled) Sets whether this table allows both a column selection and a row selection to exist simultaneously.voidJColorChooser.setChooserPanels(AbstractColorChooserPanel[] panels) Specifies the Color Panels used to choose a color value.voidJInternalFrame.setClosable(boolean b) Sets whether thisJInternalFramecan be closed by some user action.voidJInternalFrame.setClosed(boolean b) Closes this internal frame if the argument istrue.voidSets the current color of the color chooser to the specified color.voidJScrollPane.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.voidJTable.setColumnModel(TableColumnModel columnModel) Sets the column model for this table tocolumnModeland registers for listener notifications from the new column model.voidJTextArea.setColumns(int columns) Sets the number of columns for this TextArea.voidJTextField.setColumns(int columns) Sets the number of columns in thisTextField, and then invalidate the layout.voidJTable.setColumnSelectionAllowed(boolean columnSelectionAllowed) Sets whether the columns in this model can be selected.voidJToolTip.setComponent(JComponent c) Specifies the component that the tooltip describes.voidJTabbedPane.setComponentAt(int index, Component component) Sets the component atindextocomponent.voidJComponent.setComponentPopupMenu(JPopupMenu popup) Sets theJPopupMenufor thisJComponent.voidAbstractButton.setContentAreaFilled(boolean b) Sets thecontentAreaFilledproperty.voidJApplet.setContentPane(Container contentPane) Deprecated, for removal: This API element is subject to removal in a future version.Sets the contentPane property.voidJDialog.setContentPane(Container contentPane) Sets thecontentPaneproperty.voidJFrame.setContentPane(Container contentPane) Sets thecontentPaneproperty.voidJInternalFrame.setContentPane(Container c) Sets thisJInternalFrame'scontentPaneproperty.voidJWindow.setContentPane(Container contentPane) Sets thecontentPaneproperty for this window.final voidJEditorPane.setContentType(String type) Sets the type of content that this editor handles.voidJSplitPane.setContinuousLayout(boolean newContinuousLayout) Sets the value of thecontinuousLayoutproperty, which must betruefor the child components to be continuously redisplayed and laid out during user intervention.voidJFileChooser.setControlButtonsAreShown(boolean b) Sets the property that indicates whether the approve and cancel buttons are shown in the file chooser.voidJFileChooser.setCurrentDirectory(File dir) Sets the current directory.voidJComponent.setDebugGraphicsOptions(int debugOptions) Enables or disables diagnostic information about every graphics operation performed within the component or one of its children.voidJRootPane.setDefaultButton(JButton defaultButton) Sets thedefaultButtonproperty, which determines the current default button for thisJRootPane.voidJButton.setDefaultCapable(boolean defaultCapable) Sets thedefaultCapableproperty, which determines whether this button can be made the default button for its root pane.voidJDialog.setDefaultCloseOperation(int operation) Sets the operation that will happen by default when the user initiates a "close" on this dialog.voidJFrame.setDefaultCloseOperation(int operation) Sets the operation that will happen by default when the user initiates a "close" on this frame.voidJMenu.setDelay(int d) Sets the suggested delay before the menu'sPopupMenuis popped up or down.voidJInternalFrame.setDesktopIcon(JInternalFrame.JDesktopIcon d) Sets theJDesktopIconassociated with thisJInternalFrame.voidJDesktopPane.setDesktopManager(DesktopManager d) Sets theDesktopMangerthat will handle desktop-specific UI actions.voidJFileChooser.setDialogTitle(String dialogTitle) Sets the string that goes in theJFileChooserwindow's title bar.voidJFileChooser.setDialogType(int dialogType) Sets the type of this dialog.voidAbstractButton.setDisabledIcon(Icon disabledIcon) Sets the disabled icon for the button.voidJLabel.setDisabledIcon(Icon disabledIcon) Set the icon to be displayed if this JLabel is "disabled" (JLabel.setEnabled(false)).voidJTabbedPane.setDisabledIconAt(int index, Icon disabledIcon) Sets the disabled icon atindextoiconwhich can benull.voidAbstractButton.setDisabledSelectedIcon(Icon disabledSelectedIcon) Sets the disabled selection icon for the button.voidJLabel.setDisplayedMnemonic(int key) Specify a keycode that indicates a mnemonic key.voidAbstractButton.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.voidJLabel.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.voidJTabbedPane.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.voidJSplitPane.setDividerLocation(double proportionalLocation) Sets the divider location as a percentage of theJSplitPane's size.voidJSplitPane.setDividerLocation(int location) Sets the location of the divider.voidJSplitPane.setDividerSize(int newSize) Sets the size of the divider.voidJFormattedTextField.setDocument(Document doc) Associates the editor with a text document.voidJTextField.setDocument(Document doc) Associates the editor with a text document.voidJColorChooser.setDragEnabled(boolean b) Sets thedragEnabledproperty, which must betrueto enable automatic drag handling (the first part of drag and drop) on this component.voidJFileChooser.setDragEnabled(boolean b) Sets thedragEnabledproperty, which must betrueto enable automatic drag handling (the first part of drag and drop) on this component.voidJList.setDragEnabled(boolean b) Turns on or off automatic drag handling.voidJTable.setDragEnabled(boolean b) Turns on or off automatic drag handling.voidJTree.setDragEnabled(boolean b) Turns on or off automatic drag handling.voidJDesktopPane.setDragMode(int dragMode) Sets the "dragging style" used by the desktop pane.voidJPasswordField.setEchoChar(char c) Sets the echo character for thisJPasswordField.voidJComboBox.setEditable(boolean aFlag) Determines whether theJComboBoxfield is editable.voidJTree.setEditable(boolean flag) Determines whether the tree is editable.voidJComboBox.setEditor(ComboBoxEditor anEditor) Sets the editor used to paint and edit the selected item in theJComboBoxfield.voidJSpinner.setEditor(JComponent editor) Changes theJComponentthat displays the current value of theSpinnerModel.voidJEditorPane.setEditorKit(EditorKit kit) Sets the currently installed kit for handling content.voidJComboBox.setEnabled(boolean b) Enables the combo box so that items can be selected.voidJComponent.setEnabled(boolean enabled) Sets whether or not this component is enabled.voidJMenuItem.setEnabled(boolean b) Enables or disables the menu item.voidJTree.setExpandsSelectedPaths(boolean newValue) Configures theexpandsSelectedPathsproperty.voidJSlider.setExtent(int extent) Sets the size of the range "covered" by the knob.voidJFileChooser.setFileFilter(FileFilter filter) Sets the current file filter.voidJFileChooser.setFileHidingEnabled(boolean b) Sets file hiding on or off.voidJFileChooser.setFileSelectionMode(int mode) Sets theJFileChooserto allow the user to just select files, just select directories, or select both files and directories.voidJFileChooser.setFileSystemView(FileSystemView fsv) Sets the file system view that theJFileChooseruses for accessing and creating file system resources, such as finding the floppy drive and getting a list of root drives.voidJFileChooser.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.voidJTable.setFillsViewportHeight(boolean fillsViewportHeight) Sets whether or not this table is always made large enough to fill the height of an enclosing viewport.voidJList.setFixedCellHeight(int height) Sets a fixed value to be used for the height of every cell in the list.voidJList.setFixedCellWidth(int width) Sets a fixed value to be used for the width of every cell in the list.voidJToolBar.setFloatable(boolean b) Sets thefloatableproperty, which must betruefor the user to move the tool bar.voidJFormattedTextField.setFocusLostBehavior(int behavior) Sets the behavior when focus is lost.voidAbstractButton.setFocusPainted(boolean b) Sets thepaintFocusproperty, which must betruefor the focus state to be painted.voidSets the font for this component.voidJComponent.setForeground(Color fg) Sets the foreground color of this component.voidJTabbedPane.setForegroundAt(int index, Color foreground) Sets the foreground color atindextoforegroundwhich can benull, in which case the tab's foreground color will default to the foreground color of thistabbedpane.voidJFormattedTextField.setFormatterFactory(JFormattedTextField.AbstractFormatterFactory tf) Sets theAbstractFormatterFactory.voidJInternalFrame.setFrameIcon(Icon icon) Sets an image to be displayed in the titlebar of this internal frame (usually in the top-left corner).voidJApplet.setGlassPane(Component glassPane) Deprecated, for removal: This API element is subject to removal in a future version.Sets the glassPane property.voidJDialog.setGlassPane(Component glassPane) Sets theglassPaneproperty.voidJFrame.setGlassPane(Component glassPane) Sets theglassPaneproperty.voidJInternalFrame.setGlassPane(Component glass) Sets thisJInternalFrame'sglassPaneproperty.voidJWindow.setGlassPane(Component glassPane) Sets theglassPaneproperty.voidJTable.setGridColor(Color gridColor) Sets the color used to draw grid lines togridColorand redisplays.voidAbstractButton.setHideActionText(boolean hideActionText) Sets thehideActionTextproperty, which determines whether the button displays text from theAction.voidAbstractButton.setHorizontalAlignment(int alignment) Sets the horizontal alignment of the icon and text.voidJLabel.setHorizontalAlignment(int alignment) Sets the alignment of the label's contents along the X axis.voidJTextField.setHorizontalAlignment(int alignment) Sets the horizontal alignment of the text.voidJScrollPane.setHorizontalScrollBar(JScrollBar horizontalScrollBar) Adds the scrollbar that controls the viewport's horizontal view position to the scrollpane.voidJScrollPane.setHorizontalScrollBarPolicy(int policy) Determines when the horizontal scrollbar appears in the scrollpane.voidAbstractButton.setHorizontalTextPosition(int textPosition) Sets the horizontal position of the text relative to the icon.voidJLabel.setHorizontalTextPosition(int textPosition) Sets the horizontal position of the label's text, relative to its image.voidSets the button's default icon.voidJInternalFrame.setIcon(boolean b) Iconifies or de-iconifies this internal frame, if the look and feel supports iconification.voidDefines the icon this component will display.voidSets the icon to display.voidSets the icon atindextoiconwhich can benull.voidJInternalFrame.setIconifiable(boolean b) Sets theiconableproperty, which must betruefor the user to be able to make theJInternalFramean icon.voidAbstractButton.setIconTextGap(int iconTextGap) If both the icon and text properties are set, this property defines the space between them.voidJLabel.setIconTextGap(int iconTextGap) If both the icon and text properties are set, this property defines the space between them.voidJComponent.setInheritsPopupMenu(boolean value) Sets whether or notgetComponentPopupMenushould delegate to the parent if this component does not have aJPopupMenuassigned to it.voidJOptionPane.setInitialSelectionValue(Object newValue) Sets the input value that is initially displayed as selected to the user.voidJOptionPane.setInitialValue(Object newInitialValue) Sets the initial value that is to be enabled -- theComponentthat has the focus when the pane is initially displayed.voidJOptionPane.setInputValue(Object newValue) Sets the input value that was selected or input by the user.voidJComponent.setInputVerifier(InputVerifier inputVerifier) Sets the input verifier for this component.voidJTable.setIntercellSpacing(Dimension intercellSpacing) Sets therowMarginand thecolumnMargin-- the height and width of the space between cells -- tointercellSpacing.voidJSlider.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.voidJPopupMenu.setInvoker(Component invoker) Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.voidJTree.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.voidJApplet.setJMenuBar(JMenuBar menuBar) Deprecated, for removal: This API element is subject to removal in a future version.Sets the menubar for this applet.voidJDialog.setJMenuBar(JMenuBar menu) Sets the menubar for this dialog.voidJFrame.setJMenuBar(JMenuBar menubar) Sets the menubar for this frame.voidJInternalFrame.setJMenuBar(JMenuBar m) Sets themenuBarproperty for thisJInternalFrame.voidJComboBox.setKeySelectionManager(JComboBox.KeySelectionManager aManager) Sets the object that translates a keyboard character into a list selection.voidDeprecated.- Replaced bysetText(text)voidSets the popup menu's label.voidJLabel.setLabelFor(Component c) Set the component this is labelling.voidJSlider.setLabelTable(Dictionary labels) Used to specify what label will be drawn at any given value.voidJTree.setLargeModel(boolean newValue) Specifies whether the UI should use a large model.voidJSplitPane.setLastDividerLocation(int newLastLocation) Sets the last location the divider was at tonewLastLocation.voidJInternalFrame.setLayer(int layer) Convenience method for setting the layer attribute of this component.voidConvenience method for setting the layer attribute of this component.voidJApplet.setLayeredPane(JLayeredPane layeredPane) Deprecated, for removal: This API element is subject to removal in a future version.Sets the layeredPane property.voidJDialog.setLayeredPane(JLayeredPane layeredPane) Sets thelayeredPaneproperty.voidJFrame.setLayeredPane(JLayeredPane layeredPane) Sets thelayeredPaneproperty.voidJInternalFrame.setLayeredPane(JLayeredPane layered) Sets thisJInternalFrame'slayeredPaneproperty.voidJWindow.setLayeredPane(JLayeredPane layeredPane) Sets thelayeredPaneproperty.voidJList.setLayoutOrientation(int layoutOrientation) Defines the way list cells are layed out.voidJTree.setLeadSelectionPath(TreePath newPath) Sets the path identifies as the lead.voidJComboBox.setLightWeightPopupEnabled(boolean aFlag) Sets thelightWeightPopupEnabledproperty, which provides a hint as to whether or not a lightweightComponentshould be used to contain theJComboBox, versus a heavyweightComponentsuch as aPanelor aWindow.voidJPopupMenu.setLightWeightPopupEnabled(boolean aFlag) Sets the value of thelightWeightPopupEnabledproperty, which by default istrue.voidJTextArea.setLineWrap(boolean wrap) Sets the line-wrapping policy of the text area.voidJPopupMenu.setLocation(int x, int y) Sets the location of the upper left corner of the popup menu using x, y coordinates.voidJSlider.setMajorTickSpacing(int n) This method sets the major tick spacing.voidSets space for margin between the button's border and the label.voidSets the margin between the menubar's border and its menus.voidSets the margin between the tool bar's border and its buttons.voidJInternalFrame.setMaximizable(boolean b) Sets themaximizableproperty, which determines whether theJInternalFramecan be maximized by some user action.voidJInternalFrame.setMaximum(boolean b) Maximizes and restores this internal frame.voidJProgressBar.setMaximum(int n) Sets the progress bar's maximum value (stored in the progress bar's data model) ton.voidJScrollBar.setMaximum(int maximum) Sets the model's maximum property.voidJSlider.setMaximum(int maximum) Sets the slider's maximum value tomaximum.voidJComboBox.setMaximumRowCount(int count) Sets the maximum number of rows theJComboBoxdisplays.voidJComponent.setMaximumSize(Dimension maximumSize) Sets the maximum size of this component to a constant value.voidJOptionPane.setMessage(Object newMessage) Sets the option pane's message-object.voidJOptionPane.setMessageType(int newType) Sets the option pane's message type.voidJProgressBar.setMinimum(int n) Sets the progress bar's minimum value (stored in the progress bar's data model) ton.voidJScrollBar.setMinimum(int minimum) Sets the model's minimum property.voidJSlider.setMinimum(int minimum) Sets the slider's minimum value tominimum.voidJComponent.setMinimumSize(Dimension minimumSize) Sets the minimum size of this component to a constant value.voidJSlider.setMinorTickSpacing(int n) This method sets the minor tick spacing.voidAbstractButton.setMnemonic(char mnemonic) This method is now obsolete, please usesetMnemonic(int)to set the mnemonic for a button.voidAbstractButton.setMnemonic(int mnemonic) Sets the keyboard mnemonic on the current model.voidJTabbedPane.setMnemonicAt(int tabIndex, int mnemonic) Sets the keyboard mnemonic for accessing the specified tab.voidAbstractButton.setModel(ButtonModel newModel) Sets the model that this button represents.voidJComboBox.setModel(ComboBoxModel<E> aModel) Sets the data model that theJComboBoxuses to obtain the list of items.voidSets the model that represents the contents or "value" of the list, notifies property change listeners, and then clears the list's selection.voidJProgressBar.setModel(BoundedRangeModel newModel) Sets the data model used by theJProgressBar.voidJScrollBar.setModel(BoundedRangeModel newModel) Sets the model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.voidJSlider.setModel(BoundedRangeModel newModel) Sets theBoundedRangeModelthat handles the slider's three fundamental properties: minimum, maximum, value.voidJSpinner.setModel(SpinnerModel model) Changes the model that represents the value of this spinner.voidJTabbedPane.setModel(SingleSelectionModel model) Sets the model to be used with this tabbedpane.voidJTable.setModel(TableModel dataModel) Sets the data model for this table todataModeland registers with it for listener notifications from the new data model.voidSets theTreeModelthat will provide the data.voidJFileChooser.setMultiSelectionEnabled(boolean b) Sets the file chooser to allow multiple file selections.voidJSplitPane.setOneTouchExpandable(boolean newValue) Sets the value of theoneTouchExpandableproperty, which must betruefor theJSplitPaneto provide a UI widget on the divider to quickly expand/collapse the divider.voidJComponent.setOpaque(boolean isOpaque) If true the component paints every pixel within its bounds.voidJOptionPane.setOptions(Object[] newOptions) Sets the options this pane displays.voidJOptionPane.setOptionType(int newType) Sets the options to display.voidJProgressBar.setOrientation(int newOrientation) Sets the progress bar's orientation tonewOrientation, which must beSwingConstants.VERTICALorSwingConstants.HORIZONTAL.voidJScrollBar.setOrientation(int orientation) Set the scrollbar's orientation to either VERTICAL or HORIZONTAL.voidJSeparator.setOrientation(int orientation) Sets the orientation of the separator.voidJSlider.setOrientation(int orientation) Set the slider's orientation to eitherSwingConstants.VERTICALorSwingConstants.HORIZONTAL.voidJSplitPane.setOrientation(int orientation) Sets the orientation, or how the splitter is divided.voidJToolBar.setOrientation(int o) Sets the orientation of the tool bar.voidSets the current URL being displayed.voidJSlider.setPaintLabels(boolean b) Determines whether labels are painted on the slider.voidJSlider.setPaintTicks(boolean b) Determines whether tick marks are painted on the slider.voidJSlider.setPaintTrack(boolean b) Determines whether the track is painted on the slider.voidJMenu.setPopupMenuVisible(boolean b) Sets the visibility of the menu's popup.voidJPopupMenu.setPopupSize(int width, int height) Sets the size of the Popup window to the specified width and height.voidJPopupMenu.setPopupSize(Dimension d) Sets the size of the Popup window using aDimensionobject.voidJTable.setPreferredScrollableViewportSize(Dimension size) Sets the preferred size of the viewport for this table.voidJComponent.setPreferredSize(Dimension preferredSize) Sets the preferred size of this component.voidAbstractButton.setPressedIcon(Icon pressedIcon) Sets the pressed icon for the button.voidJColorChooser.setPreviewPanel(JComponent preview) Sets the current preview panel.voidJList.setPrototypeCellValue(E prototypeCellValue) Sets theprototypeCellValueproperty, and then (if the new value isnon-null), computes thefixedCellWidthandfixedCellHeightproperties by requesting the cell renderer component for the given value (and index 0) from the cell renderer, and using that component's preferred size.voidJComboBox.setPrototypeDisplayValue(E prototypeDisplayValue) Sets the prototype display value used to calculate the size of the display for the UI portion.voidJComboBox.setRenderer(ListCellRenderer<? super E> aRenderer) Sets the renderer that paints the list items and the item selected from the list in the JComboBox field.voidJInternalFrame.setResizable(boolean b) Sets whether theJInternalFramecan be resized by some user action.voidJSplitPane.setResizeWeight(double value) Specifies how to distribute extra space when the size of the split pane changes.voidJSplitPane.setRightComponent(Component comp) Sets the component to the right (or below) the divider.voidJToolBar.setRollover(boolean rollover) Sets the rollover state of this toolbar.voidAbstractButton.setRolloverEnabled(boolean b) Sets therolloverEnabledproperty, which must betruefor rollover effects to occur.voidAbstractButton.setRolloverIcon(Icon rolloverIcon) Sets the rollover icon for the button.voidAbstractButton.setRolloverSelectedIcon(Icon rolloverSelectedIcon) Sets the rollover selected icon for the button.protected voidJApplet.setRootPaneCheckingEnabled(boolean enabled) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether calls toaddandsetLayoutare forwarded to thecontentPane.protected voidJDialog.setRootPaneCheckingEnabled(boolean enabled) Sets whether calls toaddandsetLayoutare forwarded to thecontentPane.protected voidJFrame.setRootPaneCheckingEnabled(boolean enabled) Sets whether calls toaddandsetLayoutare forwarded to thecontentPane.protected voidJInternalFrame.setRootPaneCheckingEnabled(boolean enabled) Sets whether calls toaddandsetLayoutare forwarded to thecontentPane.protected voidJWindow.setRootPaneCheckingEnabled(boolean enabled) Sets whether calls toaddandsetLayoutare forwarded to thecontentPane.voidJTree.setRootVisible(boolean rootVisible) Determines whether or not the root node from theTreeModelis visible.voidJScrollPane.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.voidJTable.setRowHeight(int rowHeight) Sets the height, in pixels, of all cells torowHeight, revalidates, and repaints.voidJTable.setRowHeight(int row, int rowHeight) Sets the height forrowtorowHeight, revalidates, and repaints.voidJTree.setRowHeight(int rowHeight) Sets the height of each cell, in pixels.voidJTable.setRowMargin(int rowMargin) Sets the amount of empty space between cells in adjacent rows.voidJTextArea.setRows(int rows) Sets the number of rows for this TextArea.voidJTable.setRowSelectionAllowed(boolean rowSelectionAllowed) Sets whether the rows in this model can be selected.voidJTable.setRowSorter(RowSorter<? extends TableModel> sorter) Sets theRowSorter.voidJViewport.setScrollMode(int mode) Used to control the method of scrolling the viewport contents.voidJTree.setScrollsOnExpand(boolean newValue) Sets thescrollsOnExpandproperty, which determines whether the tree might scroll to show previously hidden children.voidJInternalFrame.setSelected(boolean selected) Selects or deselects the internal frame if it's showing.voidJMenu.setSelected(boolean b) Sets the selection status of the menu.voidJPopupMenu.setSelected(Component sel) Sets the currently selected component, This will result in a change to the selection model.voidJTabbedPane.setSelectedComponent(Component c) Sets the selected component for this tabbedpane.voidJFileChooser.setSelectedFile(File file) Sets the selected file.voidJFileChooser.setSelectedFiles(File[] selectedFiles) Sets the list of selected files if the file chooser is set to allow multiple selection.voidAbstractButton.setSelectedIcon(Icon selectedIcon) Sets the selected icon for the button.voidJComboBox.setSelectedIndex(int anIndex) Selects the item at indexanIndex.voidJList.setSelectedIndex(int index) Selects a single cell.voidJTabbedPane.setSelectedIndex(int index) Sets the selected index for this tabbedpane.voidJComboBox.setSelectedItem(Object anObject) Sets the selected item in the combo box display area to the object in the argument.voidJList.setSelectionBackground(Color selectionBackground) Sets the color used to draw the background of selected items, which cell renderers can use fill selected cells.voidJTable.setSelectionBackground(Color selectionBackground) Sets the background color for selected cells.voidJList.setSelectionForeground(Color selectionForeground) Sets the color used to draw the foreground of selected items, which cell renderers can use to render text and graphics.voidJTable.setSelectionForeground(Color selectionForeground) Sets the foreground color for selected cells.voidJList.setSelectionMode(int selectionMode) Sets the selection mode for the list.voidJTable.setSelectionMode(int selectionMode) Sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.voidJColorChooser.setSelectionModel(ColorSelectionModel newModel) Sets the model containing the selected color.voidJList.setSelectionModel(ListSelectionModel selectionModel) Sets theselectionModelfor the list to a non-nullListSelectionModelimplementation.voidJMenuBar.setSelectionModel(SingleSelectionModel model) Sets the model object to handle single selections.voidJPopupMenu.setSelectionModel(SingleSelectionModel model) Sets the model object to handle single selections.voidJTable.setSelectionModel(ListSelectionModel selectionModel) Sets the row selection model for this table toselectionModeland registers for listener notifications from the new selection model.voidJTree.setSelectionModel(TreeSelectionModel selectionModel) Sets the tree's selection model.voidJOptionPane.setSelectionValues(Object[] newValues) Sets the input selection values for a pane that provides the user with a list of items to choose from.voidJTable.setShowGrid(boolean showGrid) Sets whether the table draws grid lines around cells.voidJTable.setShowHorizontalLines(boolean showHorizontalLines) Sets whether the table draws horizontal lines between cells.voidJTree.setShowsRootHandles(boolean newValue) Sets the value of theshowsRootHandlesproperty, which specifies whether the node handles should be displayed.voidJTable.setShowVerticalLines(boolean showVerticalLines) Sets whether the table draws vertical lines between cells.voidJSlider.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.voidJCheckBoxMenuItem.setState(boolean b) Sets the selected-state of the item.voidSets the value of the progress string.voidJProgressBar.setStringPainted(boolean b) Sets the value of thestringPaintedproperty, which determines whether the progress bar should render a progress string.voidJTabbedPane.setTabComponentAt(int index, Component component) Sets the component that is responsible for rendering the title for the specified tab.voidJTabbedPane.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.voidJTable.setTableHeader(JTableHeader tableHeader) Sets thetableHeaderworking with thisJTabletonewHeader.voidJTabbedPane.setTabPlacement(int tabPlacement) Sets the tab placement for this tabbedpane.voidJTextArea.setTabSize(int size) Sets the number of characters to expand tabs to.voidSets the button's text.voidSets the text of thisTextComponentto the specified content, which is expected to be in the format of the content type of this editor.voidDefines the single line of text this component will display.voidvoidJToolTip.setTipText(String tipText) Sets the text to show when the tool tip is displayed.voidSets theJInternalFrametitle.voidJTabbedPane.setTitleAt(int index, String title) Sets the title atindextotitlewhich can benull.voidJTree.setToggleClickCount(int clickCount) Sets the number of mouse clicks before a node will expand or close.voidJComponent.setToolTipText(String text) Registers the text to display in a tool tip.voidJTabbedPane.setToolTipTextAt(int index, String toolTipText) Sets the tooltip text atindextotoolTipTextwhich can benull.voidJSplitPane.setTopComponent(Component comp) Sets the component above, or to the left of the divider.voidJApplet.setTransferHandler(TransferHandler newHandler) Deprecated, for removal: This API element is subject to removal in a future version.Sets thetransferHandlerproperty, which is a mechanism to support transfer of data into this component.voidJComponent.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.voidJDialog.setTransferHandler(TransferHandler newHandler) Sets thetransferHandlerproperty, which is a mechanism to support transfer of data into this component.voidJFrame.setTransferHandler(TransferHandler newHandler) Sets thetransferHandlerproperty, which is a mechanism to support transfer of data into this component.voidJWindow.setTransferHandler(TransferHandler newHandler) Sets thetransferHandlerproperty, which is a mechanism to support transfer of data into this component.voidSets the L&F object that renders this component.voidJColorChooser.setUI(ColorChooserUI ui) Sets the L&F object that renders this component.voidJComboBox.setUI(ComboBoxUI ui) Sets the L&F object that renders this component.protected voidJComponent.setUI(ComponentUI newUI) Sets the look and feel delegate for this component.voidJDesktopPane.setUI(DesktopPaneUI ui) Sets the L&F object that renders this component.voidJInternalFrame.setUI(InternalFrameUI ui) Sets the UI delegate for thisJInternalFrame.voidSets the L&F object that renders this component.voidSets theListUI, the look and feel object that renders this component.voidSets the L&F object that renders this component.voidJMenuItem.setUI(MenuItemUI ui) Sets the look and feel object that renders this component.voidJOptionPane.setUI(OptionPaneUI ui) Sets the UI object which implements the L&F for this component.voidSets the look and feel (L&F) object that renders this component.voidJPopupMenu.setUI(PopupMenuUI ui) Sets the L&F object that renders this component.voidJProgressBar.setUI(ProgressBarUI ui) Sets the look-and-feel object that renders this component.voidJRootPane.setUI(RootPaneUI ui) Sets the L&F object that renders this component.voidJScrollBar.setUI(ScrollBarUI ui) Sets the L&F object that renders this component.voidJSeparator.setUI(SeparatorUI ui) Sets the L&F object that renders this component.voidSets the UI object which implements the L&F for this component.voidJTabbedPane.setUI(TabbedPaneUI ui) Sets the UI object which implements the L&F for this component.voidSets the L&F object that renders this component and repaints.voidSets the L&F object that renders this component.voidSets the L&F object that renders this component.voidJViewport.setUI(ViewportUI ui) Sets the L&F object that renders this component.voidJScrollBar.setUnitIncrement(int unitIncrement) Sets the unitIncrement property.voidJTable.setUpdateSelectionOnSort(boolean update) Specifies whether the selection should be updated after sorting.voidSets the value that will be formatted by anAbstractFormatterobtained from the currentAbstractFormatterFactory.voidSets the value the user has chosen.voidJProgressBar.setValue(int n) Sets the progress bar's current value ton.voidJScrollBar.setValue(int value) Sets the scrollbar's value.voidJSlider.setValue(int n) Sets the slider's current value ton.voidJScrollBar.setValueIsAdjusting(boolean b) Sets the model's valueIsAdjusting property.voidJSlider.setValueIsAdjusting(boolean b) Sets the model'svalueIsAdjustingproperty.voidJComponent.setVerifyInputWhenFocusTarget(boolean verifyInputWhenFocusTarget) Sets the value to indicate whether input verifier for the current focus owner will be called before this component requests focus.voidAbstractButton.setVerticalAlignment(int alignment) Sets the vertical alignment of the icon and text.voidJLabel.setVerticalAlignment(int alignment) Sets the alignment of the label's contents along the Y axis.voidJScrollPane.setVerticalScrollBar(JScrollBar verticalScrollBar) Adds the scrollbar that controls the viewports vertical view position to the scrollpane.voidJScrollPane.setVerticalScrollBarPolicy(int policy) Determines when the vertical scrollbar appears in the scrollpane.voidAbstractButton.setVerticalTextPosition(int textPosition) Sets the vertical position of the text relative to the icon.voidJLabel.setVerticalTextPosition(int textPosition) Sets the vertical position of the label's text, relative to its image.voidJScrollPane.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.voidJScrollPane.setViewportBorder(Border viewportBorder) Adds a border around the viewport.voidJComponent.setVisible(boolean aFlag) Makes the component visible or invisible.voidJPopupMenu.setVisible(boolean b) Sets the visibility of the popup menu.voidJScrollBar.setVisibleAmount(int extent) Set the model's extent property.voidJList.setVisibleRowCount(int visibleRowCount) Sets thevisibleRowCountproperty, which has different meanings depending on the layout orientation: For aVERTICALlayout orientation, this sets the preferred number of rows to display without requiring scrolling; for other orientations, it affects the wrapping of cells.voidJTree.setVisibleRowCount(int newCount) Sets the number of rows that are to be displayed.voidJOptionPane.setWantsInput(boolean newValue) Sets thewantsInputproperty.voidJScrollPane.setWheelScrollingEnabled(boolean handleWheel) Enables/disables scrolling in response to movement of the mouse wheel.voidJRootPane.setWindowDecorationStyle(int windowDecorationStyle) Sets the type of Window decorations (such as borders, widgets for closing a Window, title ...) theJRootPaneshould provide.voidJTextArea.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 BeanPropertyModifier and TypeMethodDescriptionvoidAbstractColorChooserPanel.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 BeanPropertyModifier and TypeMethodDescriptionvoidTableColumn.setCellEditor(TableCellEditor cellEditor) Sets the editor to used by when a cell in this column is edited.voidTableColumn.setCellRenderer(TableCellRenderer cellRenderer) Sets theTableCellRendererused byJTableto draw individual values for this column.voidJTableHeader.setColumnModel(TableColumnModel columnModel) Sets the column model for this table tonewModeland registers for listener notifications from the new column model.voidTableColumn.setHeaderRenderer(TableCellRenderer headerRenderer) Sets theTableCellRendererused to draw theTableColumn's header toheaderRenderer.voidTableColumn.setHeaderValue(Object headerValue) Sets theObjectwhose string representation will be used as the value for theheaderRenderer.voidTableColumn.setIdentifier(Object identifier) Sets theTableColumn's identifier toanIdentifier.voidTableColumn.setMaxWidth(int maxWidth) Sets theTableColumn's maximum width tomaxWidthor, ifmaxWidthis less than the minimum width, to the minimum width.voidTableColumn.setMinWidth(int minWidth) Sets theTableColumn's minimum width tominWidth, adjusting the new minimum width if necessary to ensure that 0 <=minWidth<=maxWidth.voidTableColumn.setModelIndex(int modelIndex) Sets the model index for this column.voidTableColumn.setPreferredWidth(int preferredWidth) Sets this column's preferred width topreferredWidth.voidJTableHeader.setReorderingAllowed(boolean reorderingAllowed) Sets whether the user can drag column headers to reorder columns.voidTableColumn.setResizable(boolean isResizable) Sets whether this column can be resized.voidJTableHeader.setResizingAllowed(boolean resizingAllowed) Sets whether the user can resize columns by dragging between headers.voidSets the table associated with this header.voidTableColumn.setWidth(int width) This method should not be used to set the widths of columns in theJTable, usesetPreferredWidthinstead. -
Uses of BeanProperty in javax.swing.text
Methods in javax.swing.text with annotations of type BeanPropertyModifier and TypeMethodDescriptionJTextComponent.getAccessibleContext()Gets theAccessibleContextassociated with thisJTextComponent.Action[]JTextComponent.getActions()Fetches the command list for the editor.JTextComponent.getCaretListeners()Returns an array of all the caret listeners registered on this text component.JTextComponent.getDropLocation()Returns the location that this component should visually indicate as the drop location during a DnD operation over the component, ornullif no location is to currently be shown.JTextComponent.getInputMethodRequests()JTextComponent.getPreferredScrollableViewportSize()Returns the preferred size of the viewport for a view component.booleanJTextComponent.getScrollableTracksViewportHeight()Returns true if a viewport should always force the height of thisScrollableto match the height of the viewport.booleanJTextComponent.getScrollableTracksViewportWidth()Returns true if a viewport should always force the width of thisScrollableto match the width of the viewport.JTextComponent.getSelectedText()Returns the selected text contained in thisTextComponent.voidSets the caret to be used.voidJTextComponent.setCaretColor(Color c) Sets the current color used to render the caret.voidJTextComponent.setCaretPosition(int position) Sets the position of the text insertion caret for theTextComponent.voidJTextComponent.setDisabledTextColor(Color c) Sets the current color used to render the disabled text.voidJTextComponent.setDocument(Document doc) Associates the editor with a text document.voidJTextComponent.setDragEnabled(boolean b) Turns on or off automatic drag handling.voidJTextComponent.setEditable(boolean b) Sets the specified boolean to indicate whether or not thisTextComponentshould be editable.voidJTextComponent.setFocusAccelerator(char aKey) Sets the key accelerator that will cause the receiving text component to get the focus.voidJTextComponent.setHighlighter(Highlighter h) Sets the highlighter to be used.voidSets the keymap to use for binding events to actions.voidSets margin space between the text component's border and its text.voidJTextComponent.setSelectedTextColor(Color c) Sets the current color used to render the selected text.voidJTextComponent.setSelectionColor(Color c) Sets the current color used to render the selection.voidJTextComponent.setSelectionEnd(int selectionEnd) Sets the selection end to the specified position.voidJTextComponent.setSelectionStart(int selectionStart) Sets the selection start to the specified position.voidSets the text of thisTextComponentto the specified text. -
Uses of BeanProperty in javax.swing.tree
Methods in javax.swing.tree with annotations of type BeanPropertyModifier and TypeMethodDescriptionvoidSets the border of this component.voidSets theTreeModelthat will provide the data.voidAbstractLayoutCache.setRootVisible(boolean rootVisible) Determines whether or not the root node from theTreeModelis visible.voidVariableHeightLayoutCache.setRootVisible(boolean rootVisible) Determines whether or not the root node from theTreeModelis visible.voidAbstractLayoutCache.setRowHeight(int rowHeight) Sets the height of each cell.voidVariableHeightLayoutCache.setRowHeight(int rowHeight) Sets the height of each cell.
JList.getSelectedValuesList()