rotation of an object like a tank

I have been able to get an object to rotate on the screen by putting the affine transform inthe main paint, tell the object to paint itself, then reset the transform…works great. What I would really like to do is tell the object to paint itself and let the object handle its own rotation. If it calls the transform in its paint, it rotates around the top corner no mater what values I pass. If I set a new bufferedimage the size of the object, call rotate, draw the ojects image to the BI then return that BI to the main paint of the object, it rotated in place beautifully, but I loos my transparency. Very odd and my cigar smoke may be attlin my brain.

this will rotate around the center point.

`
x = sprite.width/2;
y = sprite.height/2;
t.translate(+x, +y);
t.rotate(theta);
t.translate(-x,-y);

or…

t.rotate(theta, x, y);
`

thanks… I also found this post allowed me to “think” about it without code.

http://www.java-gaming.org/index.php/topic,1240.0.html

In that post the coordinates of the ‘tank’ itself are translated, like:

`
x = sprite.width/2;
y = sprite.height/2;

for(float[] coord: coordsOfModel)
{
coord[0] -= x;
coord[1] -= y;
}

t.rotate(theta);

`