java.sun.com > Guidelines Home Page > Java Look and Feel Design Guidelines > Part III: The Components of the Java Foundation Classes > 10: Basic Controls > Radio Buttons |
A radio button represents an exclusive choice within a set of related options. Within a set of radio buttons, only one button can be on at any given time. The following figure shows active radio buttons and inactive radio buttons in both on and off states.
Figure 158 Radio Buttons
When users click a radio button, its setting is always set to on. An inner filled circle within the round button graphic indicates that the setting is selected. If another button in the set has previously been selected, its state changes to off. When a radio button is unavailable, users cannot change its setting.
For a list of keyboard operations for radio buttons, see Table 21.
Use the supplied radio button graphics (the open buttons with inner filled and unfilled circles).
Provide mnemonics for each radio button choice, or place a mnemonic on the label for the radio button group. In the latter case, the user navigates among the individual radio buttons with Tab and Shift-Tab. Putting the mnemonics on each radio button choice is preferable, since that makes navigation easier for users.
Although radio buttons and toggle buttons in a radio button group have the same function, use radio buttons in dialog boxes and use grouped toggle buttons with graphics in toolbars. Grouped toggle buttons with text identifiers work well in either situation.
Display radio button text to the right of the graphic unless the application is designed for locales with right-to-left writing systems, such as Arabic and Hebrew. In those locales, place the text to the left of the graphic.
The JFC includes a component that is the functional equivalent of the radio button for use in menus. See Radio Button Menu Items for more information.
See Checkbox and Radio Button Layout and Spacing for specifications on spacing between radio button choices.
Java Look and Feel Design Guidelines, second edition.
Copyright 2001. Sun Microsystems, Inc. All Rights Reserved. |