The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
Joined: Sep 20, 2008
ok i have made a custom component Block . The block starts a Timer which starts time . The Time class calls renderShape() method and that method calls repaint() .
At the paintComponent() i am changing the rotational angle by calling the rotate method . Now this is where the Rectangle should rotate .
It's because you rotate the graphical context by the same transformation, on every refresh. The graphical context is reset after a new call to paintComponent(). You need to use a variable to keep track of the total rotation so far.  And as Darryl has said, you need to do this outside the paintComponent() method. Change the rotation in your Time class, for example.
- Why are your class fields not private?
- Why aren't you using layout managers?
- Why is onefourth actually three fourths?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: can't rotate ellipse after certain period of time