Java Reference
In-Depth Information
Figure 13-10 shows a sample JList with horizontal wrap, presented as a 3×3 grid. Notice that it
still supports multiple-selection mode.
Figure 13-10. A JList with horizontal wrap
Customizing a JList Look and Feel
Each installable Swing look and feel provides a different JList appearance and set of default
UIResource value settings for the component. Figure 13-11 shows the appearance of the JList
component for the preinstalled set of look and feel types: Motif, Windows, and Ocean.
Figure 13-11. JList under different look and feel types
The available set of UIResource -related properties for a JList is shown in Table 13-9. For
the JList component, there are 17 different properties.
Table 13-9. JList UIResource Elements
Property String
Object Type
List.actionMap
ActionMap
List.background
Color
List.border
Border
List.cellHeight
Integer
List.cellRenderer
ListCellRenderer
List.focusCellHighlightBorder
Border
List.focusInputMap
InputMap
List.focusInputMap.RightToLeft
InputMap
List.font
Font
List.foreground
Color
 
Search WWH ::




Custom Search