Class TabPane

java.lang.Object
All Implemented Interfaces:
Styleable, EventTarget, Skinnable

@DefaultProperty("tabs") public class TabPane extends Control
A control that allows switching between a group of Tabs. Only one tab is visible at a time. Tabs are added to the TabPane by using the getTabs().

Tabs in a TabPane can be positioned at any of the four sides by specifying the Side.

A TabPane has two modes floating or recessed. Applying the styleclass STYLE_CLASS_FLOATING will change the TabPane mode to floating.

The tabs width and height can be set to a specific size by setting the min and max for height and width. TabPane default width will be determined by the largest content width in the TabPane. This is the same for the height. If a different size is desired the width and height of the TabPane can be overridden by setting the min, pref and max size.

When the number of tabs do not fit the TabPane a menu button will appear on the right. The menu button is used to select the tabs that are currently not visible.

Example:

 TabPane tabPane = new TabPane();
 Tab tab = new Tab();
 tab.setText("new tab");
 tab.setContent(new Rectangle(100, 50, Color.LIGHTSTEELBLUE));
 tabPane.getTabs().add(tab);
Image of the TabPane control
Since:
JavaFX 2.0
See Also: