RFR: 8281738: Create a regression test for checking the 'Space' key activation of focused Button

Sergey Bylokhov serb at openjdk.java.net
Mon Feb 14 23:27:17 UTC 2022


On Mon, 14 Feb 2022 14:04:33 GMT, Manukumar V S <mvs at openjdk.org> wrote:

> This test verifies in all platforms and in all 'Look and Feels' that pressing the 'Space' key generates ActionEvent on focused Button or not.

test/jdk/javax/swing/JButton/SpaceKeyActivatesButton.java line 67:

> 65:                     createUI();
> 66:                 });
> 67: 

I think you should add robot.waitForIdle() after the frame creation, and also wait until the button will get a focus, since the "requestFocusInWindow" might be ignored.

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

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



More information about the client-libs-dev mailing list