使用系統對話方塊列印
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();
}
}