Search:

Type: Posts; User: IHeartProgramming

Search: Search took 0.10 seconds.

  1. Re: How to animate a circle changing color

    Appreciate today's encouragements, it works! This is what I did, so now I just have to have a longer timer delay. Thanks Norm. Another questions, I'm wanting to build a selection sort and the change...
  2. Re: How to animate a circle changing color

    I just updated the latest code I had above, it so it compiles and runs, but nothing shows up in canvas. Appreciate it.
  3. Re: How to animate a circle changing color

    I made a separate method (called change_color) that handles the color change and it compiles and runs but it's a blank canvas, here's the latest (I re-posted the entire class below)



    import...
  4. Re: How to animate a circle changing color

    How would I carry out the action performed since I need to pass the listener to the Timer in the constructor because I can't put the variable updateTask outside since it needs to reference the g2d...
  5. Re: How to animate a circle changing color

    ok I moved the Timer to constructor, but currently it only displays the yellow circle. I also created a method to change color with a reference to same Graphics2D object. This is the complete...
  6. Re: How to animate a circle changing color

    I'll try that but also which way is preferred or does it not matter, so I mean should I create instance of ActionListener object and separate instance of Timer obj or should I just do former with...
  7. Re: How to animate a circle changing color

    So I shouldn't be using thread and timer? Currently I just alternate by checking the remainding of the count so if a number has no remainder by using mod operation, then change to this color else...
  8. Re: How to animate a circle changing color

    I want to change the color of the circle. I passed as param a Graphics obj in order to work with the same object, but it's not animating the colors to alternate between green and blue, starting...
  9. How to animate a circle changing color

    Hi, this is simple but I can't get it it to work. I want an initially yellow circle to then alternate b/t colors of green and blue. And also why can's I use the parameterized repaint method, it...
Results 1 to 9 of 9