如果我单击主 JFrame,Java 打印对话框将被隐藏并且输入被阻止。我尝试从 PrinterJob printDialog() 切换到 ServiceUI.printDialog()。我也试过 ServiceUIFactory factory = printService.getServiceUIFactory() 但返回 null; 如何将对话框保持在顶部或使其成为非模态?
由于无法访问信息亭,JDK 被冻结在 1.7。窗口管理器是 FVWM。
谢谢
PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
PrintService printService = PrintServiceLookup.lookupDefaultPrintService();
PrintRequestAttributeSet attrs = new HashPrintRequestAttributeSet();
//attrs.add...
PrintService service = ServiceUI.printDialog(null, 100, 100, services, printService, null, attrs);