Drawing Rotated Text

// Draw string rotated clockwise 90 degrees AffineTransform at = new AffineTransform(); at.setToRotation(Math.PI/2.0); g2d.setTransform(at); g2d.drawString("aString", x, y); // Draw string rotated counter-clockwise 90 degrees at = new AffineTransform(); at.setToRotation(-Math.PI/2.0); g2d.setTransform(at); g2d.drawString("aString", x, y);

Post a comment

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image. Ignore spaces and be careful about upper and lower case.