CheckboxGroup radioGroup = new CheckboxGroup();
checkboxes = new IndexedCheckbox[choices.length];
for (int i = 0; i < choices.length; i++) {
boolean even = (i & 1) == 0;
checkboxes[i] = new IndexedCheckbox(choices[i],
(i == selectedIndex), radioGroup, i);
checkboxes[i].addItemListener(il);
checkboxes[i].setEnabled(enabled[i]);
c.gridwidth = even ? 1 : GridBagConstraints.REMAINDER;
c.anchor = GridBagConstraints.WEST;