I have three tabs (image buttons), on each tab I have gui desinged with( radio buttons and text boxes). so each tab has a Panel and each Panel has a 'Save' Button. So when I load the gui with all the existing data from database Panel one loads up and I make changes in Panel one click Save..FAILS bcz i dont get the radio button data from the other two panels so the save fails. I am using the following method to get the radio button selected. All the code is one one
Java file only.
public static JRadioButton getSelection(ButtonGroup group) {
for (Enumeration e=group.getElements(); e.hasMoreElements(); ) {
JRadioButton b = (JRadioButton)e.nextElement();
if (b.getModel() == group.getSelection()) {
return b;
}
}
return null;
}
Please suggest how to solve this problem.