A ToolBar is a control which displays items horizontally
or vertically. The most common items to place within a ToolBar
are Buttons
, ToggleButtons
and
Separators
, but you are not restricted to just these, and
can insert any Node
into them.
If there are too many items to fit in the ToolBar an overflow button will appear. The overflow button allows you to select items that are not currently visible in the toolbar.
ToolBar sets focusTraversable to false.
Example of a horizontal ToolBar with eight buttons separated with two vertical separators.
ToolBar toolBar = new ToolBar(
new Button("New"),
new Button("Open"),
new Button("Save"),
new Separator(true),
new Button("Clean"),
new Button("Compile"),
new Button("Run"),
new Separator(true),
new Button("Debug"),
new Button("Profile")
);
extends