Java Reference
In-Depth Information
Customizing a JScrollBar Look and Feel
Each installable Swing look and feel provides a different
JScrollBar
appearance and set of
default
UIResource
values. Figure 12-4 shows the appearance of the
JScrollBar
component for
the preinstalled set of look and feel types: Motif, Windows, and Ocean.
Figure 12-4.
JScrollBar under different look and feel types
The available set of
UIResource
-related properties for a
JScrollBar
is shown in Table 12-2.
There are 28 different properties.
Table 12-2.
JScrollBar UIResource Elements
Property String
Object Type
scrollbar
Color
ScrollBar.actionMap
ActionMap
ScrollBar.allowsAbsolutePositioning
Boolean
ScrollBar.ancestorInputMap
InputMap
ScrollBar.ancestorInputMap.RightToLeft
InputMap
ScrollBar.background
Color
ScrollBar.border
Border
ScrollBar.darkShadow
Color
ScrollBar.focusInputMap
Object[ ]
ScrollBar.focusInputMap.RightToLeft
InputMap
ScrollBar.foreground
Color
ScrollBar.gradient
List
ScrollBar.highlight
Color
ScrollBar.maximumThumbSize
Dimension
ScrollBar.minimumThumbSize
Dimension
ScrollBar.shadow
Color
ScrollBar.squareButtons
Boolean
ScrollBar.thumb
Color
ScrollBar.thumbDarkShadow
Color
ScrollBar.thumbHeight
Integer
ScrollBar.thumbHighlight
Color