Image in header of print (JTable)
Hello,
I have a question about printing a JTable. I use the following code which works well but I want to extend my print with a image (a logo) in the header of every page. What is the best way to achieve this?
My second question is how I can change the font size of the header?
Thanks for your reply.
Regards Stefan.
MessageFormat header =new MessageFormat("Test");
MessageFormat footer =new MessageFormat("Page - {0}");
try{
if (!myTable.print(JTable.PrintMode.FIT_WIDTH
, header, footer, true, null,true)){
System.err.println("User cancelled printing");
}
}catch (java.awt.print.PrinterException e){
System.err.format("Cannot print %s%n", e.getMessage());
}

