To create a CheckboxGroup, one uses yet another form of the Checkbox constructor: int n = 6; Checkbox[] radio = new Checkbox[n]; CheckboxGroup group = new CheckboxGroup(); for ( int i = 0; i < n; i++ ) { radio[i] = new Checkbox( label[i], group, false ); ... } |