RFR: 8256289: java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java failed with "RuntimeException: Wrong focus owner: java.awt.Button[button1,41,36,56x23,label=Button1]" [v2]

Phil Race prr at openjdk.org
Tue Sep 9 18:42:52 UTC 2025


On Tue, 9 Sep 2025 18:00:50 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rename applet test
>
> test/jdk/java/awt/Focus/FrameInitialFocusTest/FrameInitialFocusTest.java line 66:
> 
>> 64:                     Util.waitForIdle(robot);
>> 65:                     if (!button.hasFocus()) {
>> 66:                         throw new RuntimeException("Appletviewer doesn't set default focus correctly.");
> 
> AppletViewer => Frame ?

The frame isn't setting the focus. "Focus not set on button" might be better , but I do agree the word "Appletviewer" needs to be gone !

And I was suggesting to just make the test name "IntitialFocusTest"
I thought about changing it to Frame IntitialFocusTest, but it isn't the Frame we expect to get focus.
It's the button.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27136#discussion_r2334456604


More information about the client-libs-dev mailing list