Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting the selected JRadioButton in a ButtonGroup!!

807591Aug 15 2001 — edited Mar 13 2008
This should be easy, it was pre-Swing ...

I want to get the text associated with the selected JRadioButton in a ButtonGroup. I would have thought it would be something like this:

String myText = myButtonGroup.getSelected().getText();

but it seems much less simple than this and I can't work it out.

HELP!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2008
Added on Aug 15 2001
10 comments
518 views