JRadioButtonworks the same way. Radio buttons must be members of a
ButtonGroup. Only one button of a button group is selected at a time.
A constructor for
There are other constructors that may be useful
(see the Java documentation).
JRadioButton( String text, boolean selected )
text is the words that next to the button.
selected is true then this button
starts out selected.
Only one button of a button group may start out as selected.
JRadioButton is a child class of
Radio buttons and push buttons have many methods