Java Reference
In-Depth Information
Table 5-4 shows the set of available UIResource -related properties for a JCheckBox . The
JCheckBox component has 20 different properties.
Table 5-4. JCheckBox UIResource Elements
Property String
Object Type
CheckBox.background
Color
CheckBox.border
Border
CheckBox.darkShadow
Color
CheckBox.disabledText
Color
CheckBox.focus
Color
CheckBox.focusInputMap
Object[ ]
CheckBox.font
Font
CheckBox.foreground
Color
CheckBox.gradient
List
CheckBox.highlight
Color
CheckBox.icon
Icon
CheckBox.interiorBackground
Color
CheckBox.light
Color
CheckBox.margin
Insets
CheckBox.rollover
Boolean
Checkbox.select *
Color
CheckBox.shadow
Color
CheckBox.textIconGap
Integer
CheckBox.textShiftOffset
Integer
CheckBoxUI
String
* Lowercase b is correct.
JRadioButton Class
You use JRadioButton when you want to create a mutually exclusive group of toggleable
components. Although, technically speaking, you could place a group of JCheckBox components
into a ButtonGroup and only one would be selectable at a time, they wouldn't look quite right.
At least with the predefined look and feel types, JRadioButton and JCheckBox components look
different, as Figure 5-10 shows. This difference in appearance tells the end user to expect
specific behavior from the components.
Search WWH ::




Custom Search