<Swing Dev> RFR: 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac [v2]

Sergey Bylokhov serb at openjdk.java.net
Tue Nov 3 18:41:06 UTC 2020


On Tue, 3 Nov 2020 16:32:07 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Please review a test fix for an issue seen where robot image capture is wrong if screen scale factor is more, which could result in button or frame to move out of captured dimension of 300,300.
>> Fixed by setting uiScale=1 in the test which can still reproduce JDK-7154030.
>> Mach5 job has been run for several iterations in all platforms. Link in JBS.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove uiScale

test/jdk/javax/swing/JComponent/7154030/bug7154030.java line 96:

> 94:                     locx = screenSize.width/2;
> 95:                     locy = screenSize.height/2;
> 96:                     frame.setLocation(locx, locy);

To move it to the center you can use, setLocationRelativeTo(null) and you will need to get the actual bounds of the window(locx and locy might be ignored/tweaked by the OS)

-------------

PR: https://git.openjdk.java.net/jdk/pull/955


More information about the swing-dev mailing list