I am trying to make an array of checkboxes using java in Eclipse. I tried this code from someone, but it didn't work. It said: "The constructor CheckBox (string) is undefined" (for the fourth line). What am I supossed to do?
List<CheckBox> checkboxes = new ArrayList<CheckBox>(); String labels[] = {"A", "B", "C", "D", "E", "F"}; for (int i = 0; i < labels.length; i++) { CheckBox checkbox = new CheckBox(labels[i]); checkboxes.add(checkbox); //for further use you add it to the list }
I'm also looking for ways to create array of numberpicker using java in Eclipse, but I still haven't found the way. Can anybody help me? Thank you.
Aucun commentaire:
Enregistrer un commentaire