change text colors through nested loop
I have like a table to make a nested loop in Java applet , during this loop i should change the colors like the picture said.
now i successed to make the table but i cannot change the colors because every time i try a forumla , it doesn't work.
Here is my code
int x = 63;
for (int r=1; r<=10;r++)
Color C = new Color(0,10 +(x * 2),0);
for (int c=0; c<=4; c++)
Color C2 = new Color(10 + (x * 2) ,0,0);
Font F = new Font("Arial",Font.BOLD, 24);
g.drawString("Hello",10 + ( c * 60), r * 25 );
i need to do it like this one ,what should i do to make it work ?