Skip to content

Commit 4acf634

Browse files
committed
8171998: javax/swing/JMenu/4692443/bug4692443.java fails on Windows
Reviewed-by: serb
1 parent a804c6a commit 4acf634

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

test/jdk/ProblemList.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,6 @@ javax/swing/JPopupMenu/4458079/bug4458079.java 8233556 macosx-all
806806
javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 8233637 macosx-all
807807
javax/swing/JMenuItem/6249972/bug6249972.java 8233640 macosx-all
808808
javax/swing/JMenuItem/4171437/bug4171437.java 8233641 macosx-all
809-
javax/swing/JMenu/4692443/bug4692443.java 8171998 macosx-all
810809

811810
sanity/client/SwingSet/src/ToolTipDemoTest.java 8225012 windows-all,macosx-all
812811
sanity/client/SwingSet/src/ScrollPaneDemoTest.java 8225013 linux-all

test/jdk/javax/swing/JMenu/4692443/bug4692443.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public static void main(String args[]) throws Throwable {
5050
pass = new PassedListener();
5151
passed = false;
5252
Robot robo = new Robot();
53+
robo.setAutoDelay(100);
5354

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

6061
robo.waitForIdle();
62+
robo.delay(1000);
6163

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

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

111113
mainFrame.setSize(200, 200);
112-
mainFrame.setLocation(200, 200);
114+
mainFrame.setLocationRelativeTo(null);
113115
mainFrame.setVisible(true);
114116
mainFrame.toFront();
115117
}

0 commit comments

Comments
 (0)