So the purpose of this program is to display the correct children to the parent you click on, for instance if you click on "room" you should get a couple of children named "wall", "floor", "ceiling" and so on..
What I want is, when you click on room all the other options that were available should disappear and only the children of chosen object should appear.
Now I've almost got it all to work, except for the ArrayList of strings called "strn".
First you click on a checkbox, getQuery is called and returns the children of that checkbox. Now the arraylist strn is filled with these children
and is sent off to the method called generateMenu, the checkboxes are generated. Up til this point everything is fine, however the next time this happens it generates the old and the new checkboxes, in other words the parents and the children into a big mess. I've tried to create a new arraylist, I've tried to use strn.clear(), I've tried to use strn.removeAll(strn). But it still somehow remembers what the old objects are ?
The first print line gives a full array and the 2nd gives an empty one, so it is empty ? But somehow it stores them and remembers to put them back in there when the method is called the next time.
And btw I've had all sorts of diff ways to clear/remove the array this is just one of them.