Reputation: 117
I want to print my Jtable so I i used the table.print() method :)
The method works fine and my printer to :)
But I'm getting this:
So as you can see I'm getting very small table on my a4 page...
I want it to be readable and much more large then this..
here is my code:
MessageFormat header = new MessageFormat("- {0} -");
try {
AllEmployeesTablePanel.getEmps().print(JTable.PrintMode.FIT_WIDTH,header,null);
} catch (java.awt.print.PrinterException e1) {
System.err.format("Cannot print %s%n", e1.getMessage());
}
what should I do?
Upvotes: 0
Views: 568
Reputation: 89
change like this
MessageFormat header=new MessageFormat("Report Print");
MessageFormat footer=new MessageFormat("page{0,number,integer}");
try {
jTable3.print(JTable.PrintMode.FIT_WIDTH,header,footer);
} catch(java.awt.print.PrinterException e) {
System.err.format("cant print %s%n",e.getMessage());
}
Upvotes: 0
Reputation: 117
I was able to fix it! There had been an issue with my printer settings.
Upvotes: 0