简体   繁体   中英

How can I make a Java print dialog stay on top or non-modal? (Linux)

If I click on the main JFrame, the Java print dialog is hidden and input is blocked. I tried switching from PrinterJob printDialog() to ServiceUI.printDialog(). I also tried ServiceUIFactory factory = printService.getServiceUIFactory() but that returns null; How can I keep the dialog on top or make it non-modal?

The JDK is frozen at 1.7 due to inaccessible kiosks. The window manager is FVWM.

Thanks

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);

The problem was transient window settings in the window manager FVWM. When VGR tried Gnome, that pointed me to the window manager.

Commented DontRaiseTransient in globalfeel.

#Style * DontRaiseTransient

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM