Java Reference
In-Depth Information
Only when someone selects the Find menu element would the current selection of the
ButtonGroup
for the set of
JRadioButtonMenuItem
components have any meaning.
Configuring JRadioButtonMenuItem Properties
As with
JCheckBoxMenuItem
, most of the
JRadioButtonMenuItem
properties are inherited. The
two shown in Table 6-13 merely override the behavior from the superclass.
Table 6-13.
JRadioButtonMenuItem Properties
Property Name
Data Type
Access
accessibleContext
AccessibleContext
Read-only
UIClassID
String
Read-only
Customizing a JRadioButtonMenuItem Look and Feel
The appearance of the
JRadioButtonMenuItem
under the preinstalled set of look and feel types
is shown with the other menu components in Figure 6-3.
The available set of
UIResource
-related properties for a
JRadioButtonMenuItem
is shown in
Table 6-14. For the
JRadioButtonMenuItem
component, there are 19 different properties.
Table 6-14.
JRadioButtonMenuItem UIResource Elements
Property String
Object Type
RadioButtonMenuItem.acceleratorFont
Font
RadioButtonMenuItem.acceleratorForeground
Color
RadioButtonMenuItem.acceleratorSelectionForeground
Color
RadioButtonMenuItem.actionMap
ActionMap
RadioButtonMenuItem.arrowIcon
Icon
RadioButtonMenuItem.background
Color
RadioButtonMenuItem.border
Border
RadioButtonMenuItem.borderPainted
Boolean
RadioButtonMenuItem.checkIcon
Icon
RadioButtonMenuItem.commandSound
String
RadioButtonMenuItem.disabledForeground
Color
RadioButtonMenuItem.font
Font
RadioButtonMenuItem.foreground
Color
RadioButtonMenuItem.gradient
List
RadioButtonMenuItem.margin
Insets
RadioButtonMenuItem.opaque
Boolean