aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JRadio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JRadio " Watch "JRadio " New topic
Author

JRadio

qhyang
Greenhorn

Joined: Oct 28, 2000
Posts: 12
Hi there,
I am having this kind of problem. Suppose I have a group of 5 radio buttons, each radion button associate with a text. When I select one radio button, I would like to get the associated text with this radio button.
Any help would be appreciated. Thanks!
qhyang
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi qhyang,
If you want the text displayed by the JRadioButton
the method is implemented in its parent class AbstractButton:

So you would call that method something like this:

Hope this helps,
Michael Morris
SCJP


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
qhyang
Greenhorn

Joined: Oct 28, 2000
Posts: 12
It works well.
Michael, Thanks a lot!
 
 
subject: JRadio