Друк
try {
Boolean donePrint = t1.print();
if (donePrint) {
JOptionPane.showMessageDialog(null, "Готово", "Information", JOptionPane.INFORMATION_MESSAGE);
}
else {
JOptionPane.showMessageDialog(null, "Друкується", "Printer", JOptionPane.ERROR_MESSAGE);
}
}
catch(PrinterException e){
JOptionPane.showMessageDialog(null, e);
}