How can I use the Canvas class within a loop to create a circle of different sizes and then store each Canvas object generated within a GridLayout. Can I use the same Canvas object within the loop and just assign to different rows and columns as I go or do I need to create an array, etc..,?
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Joined: Apr 09, 2002
Found the problem. I was passing in an array and assigning it to a private variable in the class but since I wasn't making a copy of the array (circle info) it was making all the circles the same size as the last one done. I changed the code to copy the array passed in instead of a direct assignment to and it works fine now. Thanks for the response.