Java javax.swing JTabbedPane fields, constructors, methods, implement or subclass

Example usage for Java javax.swing JTabbedPane fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing JTabbedPane.

The text is from its open source code.

Subclass

javax.swing.JTabbedPane has subclasses.
Click this link to see all its subclasses.

Field

intWRAP_TAB_LAYOUT
The tab layout policy for wrapping tabs in multiple runs when all tabs will not fit within a single run.
intSCROLL_TAB_LAYOUT
Tab layout policy for providing a subset of available tabs when all the tabs will not fit within a single run.

Constructor

JTabbedPane()
Creates an empty TabbedPane with a default tab placement of JTabbedPane.TOP.
JTabbedPane(int tabPlacement)
Creates an empty TabbedPane with the specified tab placement of either: JTabbedPane.TOP, JTabbedPane.BOTTOM, JTabbedPane.LEFT, or JTabbedPane.RIGHT.
JTabbedPane(int tabPlacement, int tabLayoutPolicy)
Creates an empty TabbedPane with the specified tab placement and tab layout policy.

Method

Componentadd(String title, Component component)
Adds a component with the specified tab title.
Componentadd(Component component, int index)
Adds a component at the specified tab index with a tab title defaulting to the name of the component.
voidadd(Component component, Object constraints)
Adds a component to the tabbed pane.
Componentadd(Component component)
Adds a component with a tab title defaulting to the name of the component which is the result of calling component.getName.
voidadd(Component component, Object constraints, int index)
Adds a component at the specified tab index.
voidaddChangeListener(ChangeListener l)
Adds a ChangeListener to this tabbedpane.
voidaddMouseListener(MouseListener l)
Adds the specified mouse listener to receive mouse events from this component.
voidaddTab(String title, Component component)
Adds a component represented by a title and no icon.
voidaddTab(String title, Icon icon, Component component, String tip)
Adds a component and tip represented by a title and/or icon, either of which can be null.
voidaddTab(String title, Icon icon, Component component)
Adds a component represented by a title and/or icon, either of which can be null.
voidapplyComponentOrientation(ComponentOrientation o)
Sets the ComponentOrientation property of this container and all components contained within it.
ActionMapgetActionMap()
Returns the ActionMap used to determine what Action to fire for particular KeyStroke binding.
ColorgetBackgroundAt(int index)
Returns the tab background color at index.
RectanglegetBoundsAt(int index)
Returns the tab bounds at index.
ComponentgetComponent(int n)
Gets the nth component in this container.
ComponentgetComponentAt(int index)
Returns the component at index.
intgetComponentCount()
Gets the number of components in this panel.
Component[]getComponents()
Gets all the components in this container.
IcongetDisabledIconAt(int index)
Returns the tab disabled icon at index.
intgetDisplayedMnemonicIndexAt(int tabIndex)
Returns the character, as an index, that the look and feel should provide decoration for as representing the mnemonic character.
ColorgetForegroundAt(int index)
Returns the tab foreground color at index.
IcongetIconAt(int index)
Returns the tab icon at index.
InputMapgetInputMap(int condition)
Returns the InputMap that is used during condition.
T[]getListeners(Class listenerType)
Returns an array of all the objects currently registered as FooListeners upon this JComponent.
PointgetLocationOnScreen()
Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.
intgetMnemonicAt(int tabIndex)
Returns the keyboard mnemonic for accessing the specified tab.
SingleSelectionModelgetModel()
Returns the model associated with this tabbedpane.
MouseListener[]getMouseListeners()
Returns an array of all the mouse listeners registered on this component.
DimensiongetPreferredSize()
If the preferredSize has been set to a non-null value just returns it.
ComponentgetSelectedComponent()
Returns the currently selected component for this tabbedpane.
intgetSelectedIndex()
Returns the currently selected index for this tabbedpane.
DimensiongetSize()
Returns the size of this component in the form of a Dimension object.
ComponentgetTabComponentAt(int index)
Returns the tab component at index.
intgetTabCount()
Returns the number of tabs in this tabbedpane.
intgetTabLayoutPolicy()
Returns the policy used by the tabbedpane to layout the tabs when all the tabs will not fit within a single run.
intgetTabPlacement()
Returns the placement of the tabs for this tabbedpane.
intgetTabRunCount()
Returns the number of tab runs currently used to display the tabs.
StringgetTitleAt(int index)
Returns the tab title at index.
StringgetToolTipTextAt(int index)
Returns the tab tooltip text at index.
TabbedPaneUIgetUI()
Returns the UI object which implements the L&F for this component.
intindexAtLocation(int x, int y)
Returns the tab index corresponding to the tab whose bounds intersect the specified location.
intindexOfComponent(Component component)
Returns the index of the tab for the specified component.
intindexOfTab(String title)
Returns the first tab index with a given title, or -1 if no tab has this title.
intindexOfTab(Icon icon)
Returns the first tab index with a given icon, or -1 if no tab has this icon.
intindexOfTabComponent(Component tabComponent)
Returns the index of the tab for the specified tab component.
voidinsertTab(String title, Icon icon, Component component, String tip, int index)
Inserts a new tab for the given component, at the given index, represented by the given title and/or icon, either of which may be null .
booleanisEnabled()
Determines whether this component is enabled.
booleanisEnabledAt(int index)
Returns whether or not the tab at index is currently enabled.
booleanisRequestFocusEnabled()
Returns true if this JComponent should get focus; otherwise returns false.
voidremove(Component component)
Removes the specified Component from the JTabbedPane.
voidremove(int index)
Removes the tab and component which corresponds to the specified index.
voidremoveAll()
Removes all the tabs and their corresponding components from the tabbedpane.
voidremoveChangeListener(ChangeListener l)
Removes a ChangeListener from this tabbedpane.
voidremoveMouseListener(MouseListener l)
Removes the specified mouse listener so that it no longer receives mouse events from this component.
voidremoveTabAt(int index)
Removes the tab at index.
voidrepaint(Rectangle r)
Adds the specified region to the dirty region list if the component is showing.
voidrequestFocus()
Requests that this Component gets the input focus.
voidrevalidate()
Supports deferred automatic layout.
voidsetAlignmentX(float alignmentX)
Sets the horizontal alignment.
voidsetAlignmentY(float alignmentY)
Sets the vertical alignment.
voidsetBackground(Color bg)
Sets the background color of this component.
voidsetBackgroundAt(int index, Color background)
Sets the background color at index to background which can be null, in which case the tab's background color will default to the background color of the tabbedpane.
voidsetBorder(Border border)
Sets the border of this component.
voidsetBounds(int x, int y, int width, int height)
Moves and resizes this component.
voidsetComponentOrientation(ComponentOrientation o)
Sets the language-sensitive orientation that is to be used to order the elements or text within this component.
voidsetDisabledIconAt(int index, Icon disabledIcon)
Sets the disabled icon at index to icon which can be null.
voidsetDisplayedMnemonicIndexAt(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.
voidsetEnabledAt(int index, boolean enabled)
Sets whether or not the tab at index is enabled.
voidsetFocusable(boolean focusable)
Sets the focusable state of this Component to the specified value.
voidsetFont(Font font)
Sets the font for this component.
voidsetForeground(Color fg)
Sets the foreground color of this component.
voidsetForegroundAt(int index, Color foreground)
Sets the foreground color at index to foreground which can be null, in which case the tab's foreground color will default to the foreground color of this tabbedpane.
voidsetIconAt(int index, Icon icon)
Sets the icon at index to icon which can be null.
voidsetMinimumSize(Dimension minimumSize)
Sets the minimum size of this component to a constant value.
voidsetMnemonicAt(int tabIndex, int mnemonic)
Sets the keyboard mnemonic for accessing the specified tab.
voidsetOpaque(boolean isOpaque)
If true the component paints every pixel within its bounds.
voidsetPreferredSize(Dimension preferredSize)
Sets the preferred size of this component.
voidsetRequestFocusEnabled(boolean requestFocusEnabled)
Provides a hint as to whether or not this JComponent should get focus.
voidsetSelectedComponent(Component c)
Sets the selected component for this tabbedpane.
voidsetSelectedIndex(int index)
Sets the selected index for this tabbedpane.
voidsetTabComponentAt(int index, Component component)
Sets the component that is responsible for rendering the title for the specified tab.
voidsetTabLayoutPolicy(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.
voidsetTabPlacement(int tabPlacement)
Sets the tab placement for this tabbedpane.
voidsetTitleAt(int index, String title)
Sets the title at index to title which can be null.
voidsetToolTipTextAt(int index, String toolTipText)
Sets the tooltip text at index to toolTipText which can be null.
voidsetUI(TabbedPaneUI ui)
Sets the UI object which implements the L&F for this component.
voidupdateUI()
Resets the UI property to a value from the current look and feel.