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

Manukumar V S mvs at openjdk.java.net
Fri Feb 18 08:32:38 UTC 2022


On Tue, 15 Feb 2022 08:45:46 GMT, Manukumar V S <mvs at openjdk.org> wrote:

>> 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().

Made changes for this.

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

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



More information about the client-libs-dev mailing list