Search:

Type: Posts; User: Levica

Search: Search took 0.10 seconds.

  1. Replies
    5
    Views
    1,045

    Re: Switch in a For loop

    Random rand = new Random();
    int color = 0; //1 = black, 2 = white, 3 = blue, 4 = red, 5 = yellow
    for(int r=125;r<=125;r-=25) //execute loop as long as the radius is 125(the max value used) or...
  2. Replies
    5
    Views
    1,045

    Re: Switch in a For loop

    Thanks!! After changing the int declaration to before the for loop there was still a problem where the largest radius circle of the last color showed up, but I easily fixed that by changing r within...
  3. Replies
    5
    Views
    1,045

    Switch in a For loop

    for(int r=25;r<=125;r+=25)
    {
    int color = 1;
    switch(color)
    {

    case 1 : g.setColor(Color.black); Expo.fillCircle(g,625,175,r); color++; break;
    case 2 :...
Results 1 to 3 of 3