On Wed, 22 Jan 2025 01:38:56 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:

>> Alexander Zvegintsev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   formatting
>
> 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.

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

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

Reply via email to