JDK-8173972 : createScreenCapture not working as expected on multimonitor setup with different DPI scales.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2017-02-06
  • Updated: 2017-03-16
  • Resolved: 2017-03-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 9
10Fixed 9 b161Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description

Test case Attached.

On Windows8.1:
Primary monitor(screen0) 192DPI 
Secondary monitor(screen1) 144DPI
When the frame is on screen0: works as expected, created screenshots contain the frame.
when the frame is on screen1: created screenshots do not contain the frame.
 It could be because the screenshot method uses scale 2 as on the first screen instead 1.5 that is actual scale on the second screen. So the region where the screenshot is taken is shifted.

On Linux: Not Tested.

On MacOS Sierra version 10.12: 
Tested dual monitor setup with primary Retina display and connecting a secondary monitor non-Retina display. keeping secondary monitor to the right/left of main display and targeted rectangle on each sides, expected results are obtained. 



Comments
The proposed fix: http://cr.openjdk.java.net/~alexsch/8176097/webrev.00/ The review thread: http://mail.openjdk.java.net/pipermail/awt-dev/2017-March/012645.html
03-03-2017