Nika Tsogiaidze
Nika Tsogiaidze

Reputation: 1097

JTable.print() does not print all columns

I try to print data from JTable with this code

table1.print();

But problem is that it prints just first 7 columns.There are 10 columns at all.

Any suggestions appreciated.

Upvotes: 1

Views: 796

Answers (2)

ravibagul91
ravibagul91

Reputation: 20755

Printing modes are responsible for scaling the output and spreading it across pages. You can print your table in one of the following modes:

table1.print(PrintMode.NORMAL); OR table1.print(PrintMode.FIT_WIDTH);

Have a look How to Print Tables.

Upvotes: 1

Juvanis
Juvanis

Reputation: 25950

Give a try to this line of code: table1.print(PrintMode.NORMAL);

Upvotes: 1

Related Questions