On Wed, 22 Jan 2025 03:39:44 GMT, Alexander Zvegintsev <azveg...@openjdk.org> 
wrote:

>> test/jdk/javax/swing/JPopupMenu/NestedFocusablePopupTest.java line 105:
>> 
>>> 103: 
>>> 104:     static void test1() throws Exception {
>>> 105:         Point frameLocation = frame.getLocationOnScreen();
>> 
>> Is it better to have .getLocationOnScreen() calls within EDT?
>> 
>> Since getLocationOnScreen() has the possibility of throwing 
>> IIlegalCompnentStateException, do we check if the component is visible 
>> before calling getLocationOnScreen() especially in the context of pop menus 
>> and sub menus ?
>
> We wait long enough, so if it throws the `IIlegalCompnentStateException` 
> something is not right anyway.
> 
> But I updated it to `waitTillShown` + get location on EDT to save some test 
> execution time where it is possible.

Sounds good.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22729#discussion_r1925887880

Reply via email to