Printing user specified column from JTable
Posted
by technomage
on Stack Overflow
See other posts from Stack Overflow
or by technomage
Published on 2010-04-24T17:19:47Z
Indexed on
2010/04/24
17:23 UTC
Read the original article
Hit count: 246
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?
© Stack Overflow or respective owner