title: JOptionPane in Java
body: <p>Does anyone know why tab (\t) does not work with JOptionPane.showMessageDialog? </p>
  
  <p>My code is as follows:</p>
  
  <pre><code> String addText = "NAME\t\tADDRESS\t\tTEL.No\tEMAIL\n";
          for (int i = 0; i &lt; addressBookSize; i++) {
             addText = addText+entry[i].viewAllInfo();
          }
          System.out.print(addText);
   JOptionPane.showMessageDialog(null, addText);
  </code></pre>
  
  <p>Are there other ways to align text in JOptionPane?</p>