Get the text of the selected RadioButton
So here is my code:
private JRadioButton rEndpoint[];
private JRadioButton rb49201;
private JRadioButton rb49202;
private JRadioButton rb49203;
private ButtonGroup rbGroup;
.....
rb49201 =new JRadioButton ("49201");
c.gridx = 0;
c.gridy = 2;
pSTConnect.add(rb49201,c);
rb49201.setSelected(true);
rb49202 =new JRadioButton ("49202");
c.gridx = 1;
c.gridy = 2;
pSTConnect.add(rb49202,c);
rb49203 =new JRadioButton ("49203");
c.gridx = 2;
c.gridy = 2;
pSTConnect.add(rb49203,c);
rbGroup =new ButtonGroup();
rbGroup.add(rb49201);
rbGroup.add(rb49202);
rbGroup.add(rb49203);
JRadioButton rEndpoint[] ={rb49201,rb49202,rb49203};
....
String ep =
Now I need in the String ep the exact number that appears as text on the selected radio button (when the user is pressing another button).
Thanks a lot
ILAN

