This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JRadioButton!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JRadioButton!!!" Watch "JRadioButton!!!" New topic


vikas de
Ranch Hand

Joined: Feb 07, 2001
Posts: 39
Hi Guys,
i have added JRadioButtons in my app...the prob is that i can select all RadioButtons instead of one...(Very Strange to me )i want that the user can only select one...!???
please help its urgent
feel free to mail me &
Bill Prentice

Joined: Mar 06, 2001
Posts: 26
I think you need a button group, something like this:-
ButtonGroup slotStatusRadioButtonGroup = new ButtonGroup();

JRadioButton notSelectedRadioButton = new JRadioButton(notSelectedText, true);
JRadioButton selectedRadioButton = new JRadioButton(selectedText, false);
JRadioButton markedRadioButton = new JRadioButton(markedText, false);
Obviously you would intialise the JRadioButtons to meet your own requirements.
Hope this helps
Don't get me started about those stupid light bulbs.
subject: JRadioButton!!!
Similar Threads
Printing multiple pages from a Java Browser
Java class file to exe file ???
how to print in java !!!
how to import javax... in MS J++