On Mon, 21 Apr 2025 18:19:10 GMT, Harshitha Onkar <[email protected]> wrote:
>> Alisen Chung has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> fix test
>
> test/jdk/javax/swing/JComboBox/bug4530952.java line 81:
>
>> 79: robot.delay(250);
>> 80:
>> 81: robot.mouseMove(loc.x, loc.y);
>
> For test stability , is it better to click on the center of the button rather
> than at the edge. You could use Util.getCenterPoint(btnAction) but you'll
> have to add Util to jtreg header or you can use the code below.
>
> Suggestion:
>
> SwingUtilities.invokeAndWait(() -> {
> loc = btnAction.getLocationOnScreen();
> btnSize = btnAction.getSize();
> });
> robot.waitForIdle();
> robot.delay(250);
>
> robot.mouseMove(loc.x + btnSize.width / 2,
> loc.y + btnSize.height / 2);
i've just used your code to find the center of the button
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2053081543