When I set printer for printer job with printerJob.setPrinter() it still uses a default printer to print. However in printer job settings will be printer that was passed as a parameter.
To reproduce:
Run attached project
From combobox select printer different from your default one. Do it two or more times. This is important because first time it creates job with a static constructor and then just set different printers to it
Click "Print". It will print it's printer from job settings to the console.
Check which it used for real. This will be default printer.
To reproduce:
Run attached project
From combobox select printer different from your default one. Do it two or more times. This is important because first time it creates job with a static constructor and then just set different printers to it
Click "Print". It will print it's printer from job settings to the console.
Check which it used for real. This will be default printer.
- duplicates
-
JDK-8124266 Printing: Print dialog does not show selected printer
-
- Closed
-
-
JDK-8124531 Printing: PrinterJob.createPrinterJob() creates jobs with wrong printer
-
- Closed
-