diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt
index fca80aac41e02..901590cc8e692 100644
--- a/test/jdk/ProblemList.txt
+++ b/test/jdk/ProblemList.txt
@@ -791,7 +791,6 @@ javax/swing/JRadioButton/ButtonGroupFocus/ButtonGroupFocusTest.java 8233555 maco
 javax/swing/JRadioButton/8075609/bug8075609.java 8233555 macosx-all
 javax/swing/JRadioButton/8033699/bug8033699.java 8233555 macosx-all
 javax/swing/JPopupMenu/4634626/bug4634626.java 8017175 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
 
diff --git a/test/jdk/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java b/test/jdk/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java
index 141eb204a4f86..800c7693206bb 100644
--- a/test/jdk/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java
+++ b/test/jdk/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java
@@ -63,13 +63,15 @@ public static void main(String[] args) throws Exception {
         }
 
         try {
+            Robot robot = new Robot();
+            robot.setAutoDelay(100);
 
             System.setProperty("apple.laf.useScreenMenuBar", "true");
             SwingUtilities.invokeAndWait(
                     ActionListenerCalledTwiceTest::createAndShowGUI);
 
-            Robot robot = new Robot();
-            robot.setAutoDelay(100);
+            robot.waitForIdle();
+            robot.delay(1000);
 
             testForTwice(robot, "");
 
@@ -99,6 +101,7 @@ private static void createAndShowGUI() {
         frame.setJMenuBar(bar);
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         frame.pack();
+        frame.setLocationRelativeTo(null);
         frame.setVisible(true);
     }