Charles Bell
Posts: 519
Nickname: charles
Registered: Feb, 2002
|
|
Re: Making radio buttons work
|
Posted: Jun 16, 2002 10:06 PM
|
|
With JRadioButton you have several constructors to choose from:
Constructor Summary
JRadioButton() Creates an initially unselected radio button with no set text.
JRadioButton(Action a) Creates a radiobutton where properties are taken from the Action supplied.
JRadioButton(Icon icon) Creates an initially unselected radio button with the specified image but no text.
JRadioButton(Icon icon, boolean selected) Creates a radio button with the specified image and selection state, but no text.
JRadioButton(String text) Creates an unselected radio button with the specified text.
JRadioButton(String text, boolean selected) Creates a radio button with the specified text and selection state.
JRadioButton(String text, Icon icon) Creates a radio button that has the specified text and image, and that is initially unselected.
JRadioButton(String text, Icon icon, boolean selected) Creates a radio button that has the specified text, image, and selection state.
So you can use an Action, Icon, or a String object, provided you handle it correctly.
|
|