Program is to print a JTabel and used function is
JTabel jt=new JTable();
MessageFormat headerFormat= new MessageFormat("My World Tomorrow");
MessageFormat footerFormat = new MessageFormat("Page {0}");
jt.Print(JTabel.Format,headerFormat,footerFormat);
Query is: How to print the header in two lines that is
My World
Tomorrow
Tired following solutions:
new MessageFormat("My world \n Tomorrow");
new MessageFormat("My world \r\n Tomorrow");
new MessageFormat("My world" System.getProperty("line.separator")+"Tomorrow"
);
Nothing works.