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