List of utility methods to do Draw Vertical String
void | drawVerticalString(Graphics g, String text, Font font, int x, int y) Draws a string vertically, turned 90 degrees counter-clockwise. Graphics2D g2 = (Graphics2D) g; AffineTransform fontAT = new AffineTransform(); fontAT.setToRotation(Math.PI * 3.0f / 2.0f); FontRenderContext frc = g2.getFontRenderContext(); Font theDerivedFont = font.deriveFont(fontAT); TextLayout tstring = new TextLayout(text, theDerivedFont, frc); tstring.draw(g2, x, y); |