title: how to print formatted output to printer in java standalone application
body: <p>Basically i m creating a java standalone application where a student first gives his entire details.</p>
  
  <p>when the print button is clicked i want to print some of the data given by the student in a specified format</p>
  
  <p>like:</p>
  
  <pre><code>//logo goes here
  
  
                           regn no:
                           regn date:
  name:
  phnno:
  mail:
  </code></pre>
  
  <p>how to do it??</p>