8338282: javax/swing/JMenuBar/TestMenuMnemonicLinuxAndMac.java test failed on macOS and Ubuntu

Reviewed-by: tr, dnguyen, serb
This commit is contained in:
Abhishek Kumar 2025-07-18 06:13:26 +00:00
parent a23987fecb
commit 4e0b03580d

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -41,7 +41,6 @@ import javax.swing.UIManager;
* @key headful
* @requires (os.family == "linux" | os.family == "mac")
* @library /javax/swing/regtesthelpers
* @build Util
* @summary Verifies if menu mnemonic toggle on Alt press in GTK and Aqua LAF
* @run main TestMenuMnemonicLinuxAndMac
*/
@ -117,5 +116,7 @@ public class TestMenuMnemonicLinuxAndMac {
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
frame.toFront();
frame.requestFocus();
}
}