question abt rotate(double theta) from java.awt.Graphics2D

Hi,I'm a newbie in java. In my case, there are 2 objects in the applet, i'm going to rotate 1 of them. but what i get is, both objects are rotating. May i know is it the rotate method is rotating the origin of the applet?
[230 byte] By [voicelessVocala] at [2007-11-27 6:21:28]
# 1

To only rotate one object you can:

1. apply rotation to the Graphics2D object

2. draw your "rotated" shape

3. rotate the graphics2D object in the opposite direction

(you may want to consider is there is significant cumulative

error if you do this repeatedly.)

4. draw the other shape.

Or you can draw the unrotated shape first, before applying the rotation.

Or you could use the AffineTransform method createTransformedShape to

create the rotated shape directly, without having to apply transformations to

Graphics2D.

Hippolytea at 2007-7-12 17:37:59 > top of Java-index,Java Essentials,Java Programming...