I have created general bill maker application on swing in which i've to print receipts as the output.
Basically i am not able to understand how can show the list of items on the panel so that it is able to print?

I am using PrintUtilities.java to print
the receipt panel.

What i am trying is to use a JTable for listing item details but if number of items is more than scrollpane viewport hieght than the rest of extra items are not shown and thus unable to print.

What can b the other way if i do not use JTable?
Or a solution with JTable use itself.

What i want is to extend my whole dialog vertically if no. of items exceeded rather than using autoscrolls.

I hope i am clear to my question.
Image of my receipt dialog is:
Problem in printing receipt in swing application.-dialog.png