-
Bug
-
Resolution: Won't Fix
-
P4
-
1.4.0, 7, 9
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2198186 | 8-pool | Unassigned | P4 | Closed | Won't Fix |
PrintDialog shown using PrinterJob.printDialog(attr set) does not support multi-monitor setup. When this API is invoked, the print dialog is always displayed on the default screen device regardless of where the application is running.
JTable printing internally uses PrinterJob and hence print dialog always appears on primary screen regardless of where the jtable is shown. This is incorrect.
When I looked at it more closely, this method uses ServiceDialog class for creating the dialog and that indeed supports passing a GC in which we would like to have the dialog. But printer job always uses the GraphicsConfig of the default screen device.
This is noticed on all platforms since 1.4, on a multi-monitor setup. I tested this with Solaris9, WinXP. This is well noticed on a solaris system having a multi-screen setup with 2 independent monitors.
I have attached a sample test. Execute the sample test on a multi-mon setup. You would see a frame on each of the monitor. Click the button on the frame displayed in the non-default monitor. I would expect the print dialog to be displayed in the same screen where the frame is located. But it gets displayed on the primary screen.
--------------------------------------------------------------------------------
When there are no print services available, calling PrinterJob.printDialog(attr) shows a message dialog 'No PrintService Found'. This dialog is shown always on the primary monitor and not on the monitor where active window is located. So the GC obtained from the active window must be passed to ServiceDialog.showNoPrintService() method as well.
###@###.### 10/12/04 06:03 GMT
JTable printing internally uses PrinterJob and hence print dialog always appears on primary screen regardless of where the jtable is shown. This is incorrect.
When I looked at it more closely, this method uses ServiceDialog class for creating the dialog and that indeed supports passing a GC in which we would like to have the dialog. But printer job always uses the GraphicsConfig of the default screen device.
This is noticed on all platforms since 1.4, on a multi-monitor setup. I tested this with Solaris9, WinXP. This is well noticed on a solaris system having a multi-screen setup with 2 independent monitors.
I have attached a sample test. Execute the sample test on a multi-mon setup. You would see a frame on each of the monitor. Click the button on the frame displayed in the non-default monitor. I would expect the print dialog to be displayed in the same screen where the frame is located. But it gets displayed on the primary screen.
--------------------------------------------------------------------------------
When there are no print services available, calling PrinterJob.printDialog(attr) shows a message dialog 'No PrintService Found'. This dialog is shown always on the primary monitor and not on the monitor where active window is located. So the GC obtained from the active window must be passed to ServiceDialog.showNoPrintService() method as well.
###@###.### 10/12/04 06:03 GMT
- backported by
-
JDK-2198186 PrinterJob.printDialog() does not support multi-mon, always displayed on primary
- Closed
- duplicates
-
JDK-8077319 PrinterJob.printDialog() does not support multi-mon, always displayed on primary
- Closed
- relates to
-
JDK-8138749 Revisited: PrinterJob.printDialog() does not support multi-mon, always displayed on primary
- Resolved
-
JDK-5109459 TableDemo-Print message dialog is displayed in the wrong screen, on multi-mon
- Closed