1

I'm trying to draw some text in a Graphics object; however, all the methods I'm using (Graphics.drawString(String text), TextLayout.getBounds()) simply ignore '\n' chars, while I want the written text to have several lines. Is it technically possible to draw a new line char or should I draw each line separately?

Thank you.

Pastebin code: http://pastebin.com/XuRBiETk

OLEGSHA
  • 388
  • 3
  • 13
  • This link may be of interest: http://docs.oracle.com/javase/tutorial/2d/text/drawmulstring.html because Graphics does not handle newlines. Read this: http://stackoverflow.com/questions/4413132/problems-with-newline-in-graphics2d-drawstring – TMBT Mar 17 '15 at 15:57

0 Answers0