Java Reference
In-Depth Information
Figure 3
Nesting Panels
S ELF C HECK
1. How do you add two buttons to the north area of a frame?
2. How can you stack three buttons on top of each other?
18.2 Choices
18.2.1 Radio Buttons
For a small set of mutually exclusive choices, use a group of radio buttons or a
combo box.
In this section you will see how to present a finite set of choices to the user. If the
choices are mutually exclusive, use a set of radio buttons . In a radio button set, only
one button can be selected at a time. When the user selects another button in the
same set, the previously selected button is automatically turned off. (These buttons
are called radio buttons because they work like the station selector buttons on a car
radio: If you select a new station, the old station is automatically deselected.) For
example, in Figure 4 , the font sizes are mutually exclusive. You can select small,
medium, or large, but not a combination of them.
790
791
Search WWH ::




Custom Search