My JTable is a table with some columns including a checkbox column. When the user clicks on the print button, the program will create an invisible copy of the visible table, then add a rowsorter to exclude all the rows with a checkbox that is set to false. then remove the checkbox column from the table. For the table to print I manually change the size of the table (else the content will not print).
That is how I set up the table, I hope it made sense.
But it is when I set the table to print with JTable.PrintMode.FIT_WIDTH thats not working as it should. The table is not printed across the whole page, like it still believes that the removed column is still there, resulting in that the rigthmost column will be cut, and not all data will be printed. I don't have this problem when printing JTable.PrintMode.NORMAL.
I hope my explanation made sense.
I have tried a long time to fix this but without result.
I'd be gratefull if someone could help me.
Here is the code.
edit: I have removed the code till someone who knows tells me it is okay (see the two posts below).
That is how I set up the table, I hope it made sense.
But it is when I set the table to print with JTable.PrintMode.FIT_WIDTH thats not working as it should. The table is not printed across the whole page, like it still believes that the removed column is still there, resulting in that the rigthmost column will be cut, and not all data will be printed. I don't have this problem when printing JTable.PrintMode.NORMAL.
I hope my explanation made sense.
I have tried a long time to fix this but without result.
I'd be gratefull if someone could help me.
Here is the code.
edit: I have removed the code till someone who knows tells me it is okay (see the two posts below).