On Thu, 17 Jul 2025 08:04:34 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> Abhishek Kumar has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Remove build util
>
> test/jdk/javax/swing/JMenuBar/TestMenuMnemonicLinuxAndMac.java line 120:
> 
>> 118:         frame.setVisible(true);
>> 119:         frame.toFront();
>> 120:         frame.requestFocus();
> 
> If you are particular about focus being gained before the test starts, maybe 
> you can use `CountDownLatch `and have FocusListener for frame and  wait till 
> timeout and  release the latch in `focusGained`

`CountDownlatch` should be used along with` requestFocus` ?
Otherwise, I think the test will timeout anyway because if we remove these two 
statements, frame may not have focus.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26307#discussion_r2213056140

Reply via email to