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

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Wed Nov 4 14:38:07 UTC 2020


On Wed, 4 Nov 2020 06:21:26 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> I know setLocationRelativeTo(null) will move to center of screen but I needed the coordinate for robot interaction.
>> The locx,locy calculation to move to center of screen is done intentionally as we need to use the same coordinate in robot to capture the screen
>
>> The locx,locy calculation to move to center of screen is done intentionally as we need to use the same coordinate in robot to capture the screen
> 
> You can use locx/loxy intentionally to move the window, but you can't use it in a robot because of:
>> you will need to get the actual bounds of the window(locx and locy might be ignored/tweaked by the OS)

Modified to use bounds.

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

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


More information about the swing-dev mailing list