"Java prog#26.How to print JTable in Java netbeans" of my YouTube channel ProgrammingKnowledge
Click Link to watch the video LINKThis code below is for the cmd_printActionPerformed method action perform
MessageFormat header = new MessageFormat("Your Header name ");
MessageFormat footer = new MessageFormat("Page {0,number,integer} ");
try {
jTable1_pumpdata.print(JTable.PrintMode.FIT_WIDTH, header, footer, true, null, true, null);
//table.print(JTable.PrintMode.FIT_WIDTH, header, null);
// jTable1_pumpdata.print(JTable.PrintMode.FIT_WIDTH, header, footer);
} catch (java.awt.print.PrinterException e) {
System.err.format("Cannot print %s%n", e.getMessage());
}
0 comments:
Post a Comment