Java Reference
In-Depth Information
Table 6-16. JToolBar UIResource Elements (Continued)
Property String
Object Type
ToolBar.border
Border
ToolBar.borderColor
Color
ToolBar.darkShadow
Color
ToolBar.dockingBackground
Color
ToolBar.dockingForeground
Color
ToolBar.floatingBackground
Color
ToolBar.floatingForeground
Color
ToolBar.font
Font
ToolBar.foreground
Color
ToolBar.handleIcon
Icon
ToolBar.highlight
Color
ToolBar.isRollover
Boolean
ToolBar.light
Color
ToolBar.nonrolloverBorder
Border
ToolBar.rolloverBorder
Border
ToolBar.separatorSize
Dimension
ToolBar.shadow
Color
ToolBarSeparatorUI
String
ToolBarUI
String
A Complete JToolBar Usage Example
The program in Listing 6-8 demonstrates a complete JToolBar example that results in a toolbar
with a series of diamonds on the buttons. The program also reuses the ShowAction defined for
the menuing example, presented in Listing 6-2 earlier in this chapter.
The rollover property is enabled to demonstrate the difference for the current look and
feel. See Figure 6-12 for the output as you move your mouse over the different buttons.
Figure 6-12. JToolBar example with isRollover enabled
 
Search WWH ::




Custom Search