Example usage for Java javax.swing JTabbedPane fields, constructors, methods, implement or subclass
The text is from its open source code.
int | WRAP_TAB_LAYOUT The tab layout policy for wrapping tabs in multiple runs when all tabs will not fit within a single run. |
int | SCROLL_TAB_LAYOUT Tab layout policy for providing a subset of available tabs when all the tabs will not fit within a single run. |
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. |
Component | add(String title, Component component) Adds a component with the specified tab title. |
Component | add(Component component, int index) Adds a component at the specified tab index with a tab title defaulting to the name of the component. |
void | add(Component component, Object constraints) Adds a component to the tabbed pane. |
Component | add(Component component) Adds a component with a tab title defaulting to the name of the component which is the result of calling component.getName . |
void | add(Component component, Object constraints, int index) Adds a component at the specified tab index. |
void | addChangeListener(ChangeListener l) Adds a ChangeListener to this tabbedpane. |
void | addMouseListener(MouseListener l) Adds the specified mouse listener to receive mouse events from this component. |
void | addTab(String title, Component component) Adds a component represented by a title and no icon. |
void | addTab(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 . |
void | addTab(String title, Icon icon, Component component) Adds a component represented by a title and/or icon , either of which can be null . |
void | applyComponentOrientation(ComponentOrientation o) Sets the ComponentOrientation property of this container and all components contained within it. |
ActionMap | getActionMap() Returns the ActionMap used to determine what Action to fire for particular KeyStroke binding. |
Color | getBackgroundAt(int index) Returns the tab background color at index . |
Rectangle | getBoundsAt(int index) Returns the tab bounds at index . |
Component | getComponent(int n) Gets the nth component in this container. |
Component | getComponentAt(int index) Returns the component at index . |
int | getComponentCount() Gets the number of components in this panel. |
Component[] | getComponents() Gets all the components in this container. |
Icon | getDisabledIconAt(int index) Returns the tab disabled icon at index . |
int | getDisplayedMnemonicIndexAt(int tabIndex) Returns the character, as an index, that the look and feel should provide decoration for as representing the mnemonic character. |
Color | getForegroundAt(int index) Returns the tab foreground color at index . |
Icon | getIconAt(int index) Returns the tab icon at index . |
InputMap | getInputMap(int condition) Returns the InputMap that is used during condition . |
T[] | getListeners(Class Returns an array of all the objects currently registered as FooListener s upon this JComponent . |
Point | getLocationOnScreen() 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. |
int | getMnemonicAt(int tabIndex) Returns the keyboard mnemonic for accessing the specified tab. |
SingleSelectionModel | getModel() Returns the model associated with this tabbedpane. |
MouseListener[] | getMouseListeners() Returns an array of all the mouse listeners registered on this component. |
Dimension | getPreferredSize() If the preferredSize has been set to a non-null value just returns it. |
Component | getSelectedComponent() Returns the currently selected component for this tabbedpane. |
int | getSelectedIndex() Returns the currently selected index for this tabbedpane. |
Dimension | getSize() Returns the size of this component in the form of a Dimension object. |
Component | getTabComponentAt(int index) Returns the tab component at index . |
int | getTabCount() Returns the number of tabs in this tabbedpane . |
int | getTabLayoutPolicy() Returns the policy used by the tabbedpane to layout the tabs when all the tabs will not fit within a single run. |
int | getTabPlacement() Returns the placement of the tabs for this tabbedpane. |
int | getTabRunCount() Returns the number of tab runs currently used to display the tabs. |
String | getTitleAt(int index) Returns the tab title at index . |
String | getToolTipTextAt(int index) Returns the tab tooltip text at index . |
TabbedPaneUI | getUI() Returns the UI object which implements the L&F for this component. |
int | indexAtLocation(int x, int y) Returns the tab index corresponding to the tab whose bounds intersect the specified location. |
int | indexOfComponent(Component component) Returns the index of the tab for the specified component. |
int | indexOfTab(String title) Returns the first tab index with a given title , or -1 if no tab has this title. |
int | indexOfTab(Icon icon) Returns the first tab index with a given icon , or -1 if no tab has this icon. |
int | indexOfTabComponent(Component tabComponent) Returns the index of the tab for the specified tab component. |
void | insertTab(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 . |
boolean | isEnabled() Determines whether this component is enabled. |
boolean | isEnabledAt(int index) Returns whether or not the tab at index is currently enabled. |
boolean | isRequestFocusEnabled() Returns true if this JComponent should get focus; otherwise returns false . |
void | remove(Component component) Removes the specified Component from the JTabbedPane . |
void | remove(int index) Removes the tab and component which corresponds to the specified index. |
void | removeAll() Removes all the tabs and their corresponding components from the tabbedpane . |
void | removeChangeListener(ChangeListener l) Removes a ChangeListener from this tabbedpane. |
void | removeMouseListener(MouseListener l) Removes the specified mouse listener so that it no longer receives mouse events from this component. |
void | removeTabAt(int index) Removes the tab at index . |
void | repaint(Rectangle r) Adds the specified region to the dirty region list if the component is showing. |
void | requestFocus() Requests that this Component gets the input focus. |
void | revalidate() Supports deferred automatic layout. |
void | setAlignmentX(float alignmentX) Sets the horizontal alignment. |
void | setAlignmentY(float alignmentY) Sets the vertical alignment. |
void | setBackground(Color bg) Sets the background color of this component. |
void | setBackgroundAt(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 . |
void | setBorder(Border border) Sets the border of this component. |
void | setBounds(int x, int y, int width, int height) Moves and resizes this component. |
void | setComponentOrientation(ComponentOrientation o) Sets the language-sensitive orientation that is to be used to order the elements or text within this component. |
void | setDisabledIconAt(int index, Icon disabledIcon) Sets the disabled icon at index to icon which can be null . |
void | 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 | setEnabledAt(int index, boolean enabled) Sets whether or not the tab at index is enabled. |
void | setFocusable(boolean focusable) Sets the focusable state of this Component to the specified value. |
void | setFont(Font font) Sets the font for this component. |
void | setForeground(Color fg) Sets the foreground color of this component. |
void | setForegroundAt(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 . |
void | setIconAt(int index, Icon icon) Sets the icon at index to icon which can be null . |
void | setMinimumSize(Dimension minimumSize) Sets the minimum size of this component to a constant value. |
void | setMnemonicAt(int tabIndex, int mnemonic) Sets the keyboard mnemonic for accessing the specified tab. |
void | setOpaque(boolean isOpaque) If true the component paints every pixel within its bounds. |
void | setPreferredSize(Dimension preferredSize) Sets the preferred size of this component. |
void | setRequestFocusEnabled(boolean requestFocusEnabled) Provides a hint as to whether or not this JComponent should get focus. |
void | setSelectedComponent(Component c) Sets the selected component for this tabbedpane. |
void | setSelectedIndex(int index) Sets the selected index for this tabbedpane. |
void | setTabComponentAt(int index, Component component) Sets the component that is responsible for rendering the title for the specified tab. |
void | 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 | setTabPlacement(int tabPlacement) Sets the tab placement for this tabbedpane. |
void | setTitleAt(int index, String title) Sets the title at index to title which can be null . |
void | setToolTipTextAt(int index, String toolTipText) Sets the tooltip text at index to toolTipText which can be null . |
void | setUI(TabbedPaneUI ui) Sets the UI object which implements the L&F for this component. |
void | updateUI() Resets the UI property to a value from the current look and feel. |