Hi Muzikk,
das habe ich ebenfalls getestet. Ich become ein Fehler Meldung.
Also ich habe so was :
PrintRequestAttributeSet attr = new HashPrintRequestAttributeSet();
attr.add(...);
attr.add(...);
MessageFormat header= new MessageFormat("myProjectname\n, myAdress\n, myEmail\n");
MessageFormat footer = new MessageFormat("Page {0,number,#.#}");
table.print(JTable.PrintMode.FIT_WIDTH, header, footer, true, attr, true);
(1)-->was ich oben geschrieben habe, funktioniert nicht mit einem Multi Line Versucht!
(2)--> wenn ich so was schreibe :
table.print(JTable.PrintMode.FIT_WIDTH, MessageFormat.format("hallo{0}welt", "\na\nb\n"), footer, true, attr, true);
PrintUtilities.java:92: cannot find symbol
symbol : method print(javax.swing.JTable.PrintMode,java.lang.String,java.text.MessageFormat,boolean,javax.print.attribute.PrintRequestAttributeS
et,boolean)
location: class javax.swing.JTable
table.print(JTable.PrintMode.FIT_WIDTH, MessageFormat.format("hallo{0}welt", "\na\nb\n"), footer, true, attr, tru
e);
Mathieu