RFR: 8280913: Create a regression test for JRootPane.setDefaultButton() method [v5]

Alexey Ivanov aivanov at openjdk.java.net
Thu Feb 3 21:21:07 UTC 2022


On Thu, 3 Feb 2022 19:06:42 GMT, Manukumar V S <mvs at openjdk.org> wrote:

>> This tests the behaviour of the method JRootPane.setDefaultButton() in different platforms with different LAFs.
>> As per the spec https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/JRootPane.html#setDefaultButton(javax.swing.JButton), "The default button is the button which will be activated when a UI-defined activation event (typically the Enter key) occurs in the root pane regardless of whether or not the button has keyboard focus (unless there is another component within the root pane which consumes the activation event, such as a JTextPane). ".
>> 
>> This test is run multiple times in different platforms and got 100% success in mac and windows, linux.
>
> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8280913: Create a regression test for JRootPane.setDefaultButton() method

Marked as reviewed by aivanov (Reviewer).

test/jdk/javax/swing/JRootPane/DefaultButtonTest.java line 38:

> 36:  * @key headful
> 37:  * @bug 8280913
> 38:  * @summary Check whether the default button is honored when <Enter> key is typed.

“pressed” was better.

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

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



More information about the client-libs-dev mailing list