使用系统对话框打印
PrinterJob pJ = PrinterJob.createPrinterJob();
if (pJ != null) {
boolean success = pJ.showPrintDialog(primaryStage);// this is the important line
if (success) {
pJ.endJob();
}
}
PrinterJob pJ = PrinterJob.createPrinterJob();
if (pJ != null) {
boolean success = pJ.showPrintDialog(primaryStage);// this is the important line
if (success) {
pJ.endJob();
}
}