Element: ToolBar.

Icon:

Text: A toolbar container.

Description: A ToolBar is a container element that is useful for displaying commonly used controls. It is usually displayed within its  parent window, but can also be dragged into a separate window.

Table of properties

Name Description Values accepted
Main
Floatable Whether the tool bar can be dragged into a different position within the same container or out into its own window. A boolean variable or one of the constants true or false.
Layout The policy for laying out the children of this container. An Object variable of the class java.awt.Layout or one of the following constants: border, flow, grid, hbox, vbox.
  • flow requires an additional parameter, that indicates the alignment of its children. It must be one of the constants: left, center or right.
  • grid requires two additional integer parameters, indicating the number of rows and columns of the grid, respectively.

All the options accept two optional integer parameters that indicate the horizontal and vertical separation between children. For instance, border:10,5.

Orientation The orientation of the tool bar One of the constants: horizontal o vertical

It can also be an integer variable (consult the Javadoc reference for the class javax.swing.JSplitPane). 

Visible The visibility of the element. A boolean variable or one of the constants true or false.
Size The size of the element. An Object variable of the class java.awt.Dimension or the integer values for the width and the height, respectively, separated by a comma. The special value pack adjusts the size to the minimum required by the children of the element.
Border An empty area that surrounds the element. An Object variable of the class java.awt.Rectangle or four integer numbers indicating the top, left, bottom and right margins, respectively.  
Graphical Aspect
Border Painted Whether the border should be painted. A boolean variable or one of the constants true or false.
Roll over Whether the border of the toolbar buttons should be drawn only when the mouse pointer hovers over them. A boolean variable or one of the constants true or false.
Background The color used for the background of the element and that of its children (unless they explicitely set their own value for this property). An Object variable of the class java.awt.Color or one of the predefined colors: black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, yellow.

A color can also be specified providing its integer RGB coordinates (between 0 and 255), plus an optional transparency coordinate.

The default value is decided by the system.

Foreground The color used for any text displayed by the element or by its children (unless they explicitely set their own value for this property). See the values for the Background property.
Font The font used for any text displayed by the element or by its children (unless they explicitely set their own value for this property). An Object variable of the class java.awt.Font or a set of family, style and size, separated by commas. The style must be one of  plain, bold, italic, bold | italic. Example: Monospaced,italic,18.

The default value is decided by the system.

Tooltip The text displayed when the cursor lingers on top of the element. Any constant or variable of type String.