12.6 Radio Buttons and Checkboxes

If you have ever completed a survey on the web, you are probably familiar with radio buttons and checkboxes.

Radio buttons prompt the user to select one of several mutually exclusive options. Clicking on any radio button deselects any previously selected radio button. Thus, in a group of radio buttons, a user can select only one option at a time.

Checkboxes are often associated with the instruction “check all that apply”; that is, the user is asked to select 0, 1, or more options. A checkbox is a toggle button in that if the option is not currently selected, clicking on a checkbox selects the option; if the option is currently selected, clicking on the checkbox deselects the option.

We present two similar ...

Get Java Illuminated, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.