ButtonGroup multiple selection not possible.
843807Feb 19 2010 — edited Feb 26 2010Hey Guys,
I have been trying to add a Buttongroup where i can select more than 1 JCheckBox. does anyone know how i can modify the code below so that i can select more than just one JCheckBox in the group?
ButtonGroup GroupPreferences = new ButtonGroup();
GroupPreferences.add(PreQ1);
GroupPreferences.add(PreQ2);
GroupPreferences.add(PreQ3);
GroupPreferences.add(PreQ4);
GroupPreferences.add(PreQ5);
GroupPreferences.add(PreQ6);
GroupPreferences.add(PreQ7);
GroupPreferences.add(PreQ8);
GroupPreferences.add(PreQ9);
if (PreQ1.isSelected()){
}
...etc.
Thank you
max