title: How to design a POS bill in java?
body: <p>I'm designing a java application to a pharmacy and I wanted to print a bill for their customers. I tried using <code>jasper</code> reports but I was unable to design it properly.</p>
  
  <p>I have created 2 <code>jTables</code> to display items in stock and another to display the bill. Bellow the bill table 2 <code>jLables</code> and 1 <code>jTextField</code> used to show the total, balance and received amounts. I wanted to print the details in the bill table and values in 2 <code>jLabels</code> and <code>jTextField</code> when I click the "Pay" button. I want to design it like this <a href="https://www.google.lk/search?q=pos%20bill&amp;es_sm=93&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ei=jHxIVJ2yNoehmgWzrIGQAw&amp;ved=0CAgQ_AUoAQ#facrc=_&amp;imgdii=_&amp;imgrc=hgF0BiaplJ1BMM%253A%3B0wlnxt-vOwJRYM%3Bhttp%253A%252F%252Fwww.tallysolutions.com%252Fwebsite%252FCHM%252FTallyERP9%252F04_ADVANCED_FEATURES_IN_TALLY%252F02_Advanced_Inventory_Features_in_Tally%252FPoint_of_Sale%252F10_Printing_a_POS_Invoice_2.gif%3Bhttp%253A%252F%252Fwww.tallysolutions.com%252Fwebsite%252FCHM%252FTallyERP9%252F04_ADVANCED_FEATURES_IN_TALLY%252F02_Advanced_Inventory_Features_in_Tally%252FPoint_of_Sale%252FPrinting_a_POS_Invoice.htm%3B265%3B436" rel="nofollow">POS bill</a> </p>
  
  <p>How to design and print a bill like this in java? How to change the page size?</p>
  
  <p>I'm using <code>netbeans</code> to develop.</p>
  
  <p>Can any one please help me?</p>