I'm kind of new at programming, and I'm trying to create an arraylist to hold 6 or 7 colors that can be used in a for loop so that they can be assigned like color(0), color(1), so that in my loop, I can make it say setColor(color(loop)). Loop is my int from my for loop. Basically, each time it runs the loop, I want the color to be the next one in the arraylist.
for (int loop = 0; loop <= 5; loop++){ myPen.setColor(color(loop)); }
Is this possible?