Do you understand arrays and how to use an index with them?
By changing the value of the index from 0 to the length of the array-1 the code can access each element in the array in turn. (in turn...
Type: Posts; User: Norm
Do you understand arrays and how to use an index with them?
By changing the value of the index from 0 to the length of the array-1 the code can access each element in the array in turn. (in turn...
Use an array of Colors: Color[] theColorArray = {Color.red, Color.blue};
Access each element in turn inside of the setBackground(theColorArray[theIdx]) method.
Make sure the array has enough colors...