Printing JTables without formatting of the original component
Posted
by EricR
on Stack Overflow
See other posts from Stack Overflow
or by EricR
Published on 2010-05-24T21:10:57Z
Indexed on
2010/05/24
21:21 UTC
Read the original article
Hit count: 270
I'm writing an application which utilises tables which can be printed if the user so desires and I wish to print a JTable filled with data, except I haven't been able to find an option to remove the formatting; the printed tables looks like it does in the GUI (based on the system theme) which is making the table less readable and using excess ink.
I wish to print the same data with clear formatting. Is there a way to do this straight from a JTable or is my best option simply to print to a file and have the use printer from there. Currently it functions through a viewer which gives the user some options for printing, and then it goes to the system's printer.
© Stack Overflow or respective owner