This is exactly what I'm trying to do:
Graphics2D g2 = (Graphics2D) g;
g2.setFont(new Font("Serif", Font.PLAIN, 5));
g2.setPaint(Color.black);
g2.drawString("Line 1\nLine 2", x, y);
That line prints like this:
Line1Line2
I want it like this:
Line1
Line2
How can I do this in drawString
?
As well as how can I do a tab space for a line??