On Thu, 5 Oct 2023 15:15:24 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

> But 1st case uses center coordinates via Util.getCenterPoint whereas 2nd case 
> uses getLocationOnScreen+10 so it's not exactly the same.

Yes, they're somewhat different. Yet the centre is safer (what if 
`getLocationOnScreen+10` is out of menu bounds?), it doesn't change the test 
logic.

> I guess we can do away with Util class and make it use 
> SwingUtilities.invokeAndWait but I guess we can do it at later point..

It's possible… yet I don't see much value in doing so, the `Util` class does it 
job… and avoids duplicating code.

However, `glide` method doesn't provide a smooth glide: with its 10-pixel step, 
the mouse is moved from the "Menu" to the greyed out item in just two steps. 
It's still a drag yet I expected smoother movement.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1347606918

Reply via email to