【发布时间】:2016-06-27 04:36:21
【问题描述】:
如何在不弹出对话框的情况下自动打印或自动接受打印对话框?这是我的一些代码:
if ("OUT".equals(rs.getString("empattendance"))) {
String date = dft.format(dNow);
String time = tft.format(dNow);
textArea.setText(date + "\n" + "\n" +
fullname +"\n" +
"Time In: " + time + "\n" +
"Status: "+ statusin +
"\n" +
"\n" +
"____________________\n" +
" Sign by Supervisor");
try {
//printing
Boolean complete = textArea.print();
if(complete){
}
else{
}
} catch (PrinterException ex) {
Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);
}
这是当前行为的the screenshot。
谢谢
【问题讨论】:
标签: java thermal-printer