我尝试按此顺序打印一些数据:
页脚
MessageFormat header = new MessageFormat("Building Materials Coperation Ltd");
MessageFormat footer = new MessageFormat("Thank you! Come again..");
MessageFormat Date = new MessageFormat("Date " + txt_date.getText());
MessageFormat Inoice_no = new MessageFormat("Invoice No " + txt_invoice_no.getText());
MessageFormat Amount = new MessageFormat("Total Amount:- Rs" + txt_Total_amount.getText());
try {
PrintRequestAttributeSet set = new HashPrintRequestAttributeSet();
jTable2.print(JTable.PrintMode.FIT_WIDTH, header, Date, false, set, false);
jTable2.print(JTable.PrintMode.FIT_WIDTH, Inoice_no, Amount, false, set, false);
jTable2.print(JTable.PrintMode.FIT_WIDTH, Inoice_no, footer, false, set, false);
} catch (java.awt.print.PrinterException e) {
JOptionPane.showMessageDialog(null, "\n" + "Error from Printer Job "
+ "\n" + e);
}
所以我有打印但是,它有3个弹出窗口打印它 我如何按顺序打印
我希望,你会帮助我找到它 (你能给我和例子,它的大帮助) 感谢