views:

106

answers:

0

I have an application, and I would like to print a JTable, but since it has many columns, I would like user to select/limit which columns to print so it can fit in regular printer paper.

I'm using JTable.print() function to print. (http://java.sun.com/docs/books/tutorial/uiswing/misc/printtable.html) Right now, my solution, is to create another JTable with the columns that user selected, then repopulate the table with the data, then send it to printer.

Is there a better way to do it?