RFR: 8281745: Create a regression test for JDK-4514331 [v2]

Manukumar V S mvs at openjdk.java.net
Tue Feb 15 08:49:54 UTC 2022


On Tue, 15 Feb 2022 05:38:38 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fixed review comments: frame created in EDT, waitForIdle() added after frame creation, editor access in EDT
>
> test/jdk/javax/swing/JTextArea/4514331/TabShiftsFocusToNextComponent.java line 100:
> 
>> 98:         editor.setEditable(false);
>> 99:         editor.requestFocusInWindow();
>> 100:         panel.add(editor);
> 
> I am not sure that this will work all the time, the requestFocusInWindow(), see part of the spec:
>>  * This component must be displayable, focusable, visible
>     * and all of its ancestors (with the exception of the top-level
>     * Window) must be visible for the request to be granted

I have moved the editor.requestFocusInWindow() call after frame.setVisible(true) and also even if this call is not honoured, the editor will get the focus as we are clicking on the editor (robot.mousePress) in runTest().

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

PR: https://git.openjdk.java.net/jdk/pull/7469



More information about the client-libs-dev mailing list