Skip to content
Permalink
Browse files
8171998: javax/swing/JMenu/4692443/bug4692443.java fails on Windows
Backport-of: 4acf634
  • Loading branch information
TheRealMDoerr committed Oct 20, 2021
1 parent cdc48c2 commit b449303166fcf4d7d16f651087bb49bffd1b5cc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
@@ -784,7 +784,6 @@ javax/swing/JPopupMenu/4458079/bug4458079.java 8233556 macosx-all
javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 8233637 macosx-all
javax/swing/JMenuItem/6249972/bug6249972.java 8233640 macosx-all
javax/swing/JMenuItem/4171437/bug4171437.java 8233641 macosx-all
javax/swing/JMenu/4692443/bug4692443.java 8171998 macosx-all
javax/swing/plaf/synth/7158712/bug7158712.java 8238720 windows-all
javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java 8238720 windows-all
javax/swing/plaf/basic/BasicComboPopup/7072653/bug7072653.java 8238720 windows-all
@@ -50,6 +50,7 @@ public static void main(String args[]) throws Throwable {
pass = new PassedListener();
passed = false;
Robot robo = new Robot();
robo.setAutoDelay(100);

SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
@@ -58,9 +59,9 @@ public void run() {
});

robo.waitForIdle();
robo.delay(1000);

int altKey = java.awt.event.KeyEvent.VK_ALT;
robo.setAutoDelay(100);
Util.hitMnemonics(robo, KeyEvent.VK_F); // Enter File menu
robo.keyPress(KeyEvent.VK_S); // Enter submenu
robo.keyRelease(KeyEvent.VK_S);
@@ -79,6 +80,7 @@ public void run() {
}
}


private static void createAndShowGUI() {
mainFrame = new JFrame("Bug 4692443");
JMenuBar mbar = new JMenuBar();
@@ -109,7 +111,7 @@ public void menuCanceled(MenuEvent e) {
mainFrame.setJMenuBar(mbar);

mainFrame.setSize(200, 200);
mainFrame.setLocation(200, 200);
mainFrame.setLocationRelativeTo(null);
mainFrame.setVisible(true);
mainFrame.toFront();
}

1 comment on commit b449303

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.