Thus, for example, if you wish to rotate, then translate, you write the following:
AffineTransform transform = new AffineTransform(); transform.translate(d.width / 2, d.height / 2); transform.rotate(- Math.PI / 2);
On the other hand, if you wish to translate, then rotate, you write the following:
AffineTransform transform = new AffineTransform(); transform.rotate(- Math.PI / 2); transform.translate(d.width / 2, d.height / 2);