Java: JRadio Button

       c1=new JRadioButton(" apple ");
        c2=new JRadioButton("    Orange     ");
        btGroup=new ButtonGroup();
        Hi, i have radio buttons that are in a group. I am trying to get the value of the radio button that i select. how do i do that ?
Who is Participating?
zizi21Author Commented:
if i use the getActionCommand() to get the string, than i have problem using it for buttons..coz, currently,
i am using actionPerformed for my jbuttons as well.
It is it possible to refresh the actioncommand ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.