Radio buttons represent a set of mutually exclusive choices. The JRadioButton component maintains a round selection icon, it does not provide the mutual exclusion functionality. That is the responsibility of the ButtonGroup component [Topley, p585]. The radio buttons are added to a panel for real estate management, and they are added to a ButtonGroup to achieve the "one at a time" selection capability.

The sample output at the bottom demonstrates the receipt of an "off" event immediately prior to the arrival of the corresponding "on" event.

Also included in the example is a preview of the new Box container. Box is a panel that comes with a BoxLayout as its default layout manager. BoxLayout is useful if you want to lay out a single row or a single column of components within a container. [Topley, p151]

BoxLayout will be discussed in detail later.

[Reference: Topley, pp583-590]