Hi,
I have 2 choiceGroups, all I want to do is: when I hit Send command then all checked checkboxes in choiceGroup1 and those in choiceGroup2 will swap together (also delete checked ones) here is my function, I'm working with Netbean:
PHP Code:
private void UpdateValue()
{
boolean get1[] = new boolean[choiceGroup.size()];
choiceGroup.getSelectedFlags(get1);
for (int i = 0; i < get1.length; i++) {
if (get1[i]) {
choiceGroup1.append(choiceGroup.getString(i), null);
choiceGroup.delete(i);
}
}
boolean get2[] = new boolean[choiceGroup1.size()];
choiceGroup1.getSelectedFlags(get2);
for (int j = 0; j < get2.length; j++) {
if (get2[j]) {
choiceGroup.append(choiceGroup1.getString(j), null);
choiceGroup1.delete(j);
}
}
}
it doesnt work when u check all checkboxes in choiceGroup1 or choiceGroup2
sorry for my bad English, please help