I think the problem could be a rounding error somewhere. Up to a point your rotate(angle)...rotate(-angle)
turn the transform on and off, but at some angle the restored transform that's left after rotate(-angle) may
have some tiny amount of rotation left because of rounding error, which means that all the rest of the
rendering will be rendered transformed, even though you don't see it.
So one suggestion would be to instead of rotate/unrotate try savetransform/rotate/restoretransform .
Also, I can't find it, but I believe there was a bug fixed in mustang (jdk6.0) which at least partly addressed
this. Could you please try mustang (http://mustang.dev/java.net)?