Hi,
Declare the check box objects as an array like
JCheckBox[] readwrite;
Get the no.of users and pass them to the constructor of the class and in that constructor instatiate the checkboxes like
readwrite = new JChechBox[noofusers];
for(int i=0;i<noofusers;i++){
readwrite[i] = new JCheckBox("Yes", false);
}
Hope its helpful.
Regards,
Rakesh :)
|