Two
Here is the part of the program for
the gender buttons.
The buttons are added to the
genderPanel
, which
controls their graphic representation
on screen, and added to the
genderGroup
, which controls
their logical operation.
BoxLayout
is used to put the
label and the two radio buttons in a vertical column.
The JLabel
is constructed and
added to the panel in a single statement.
This is fine, since there will be no need to
refer to the label as a variable.
Decide on the parameters for BoxLayout
and fill in
the blanks.
(Remember that the constructor needs a reference to the component that will use the new layout manager.)