Search:

Type: Posts; User: Norm

Search: Search took 0.30 seconds.

  1. Replies
    7
    Views
    885

    Re: Buttons Multicoloured gridlayout

    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...
  2. Replies
    7
    Views
    885

    Re: Buttons Multicoloured gridlayout

    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...
Results 1 to 2 of 2