7032911: javax/swing/JLabel/7004134/bug7004134.java test fails against jdk7
authorrupashka
Thu, 14 Apr 2011 12:37:11 +0400
changeset 9225 27a2a803f6f8
parent 9224 75c0420badef
child 9226 d0aa5fcc8743
7032911: javax/swing/JLabel/7004134/bug7004134.java test fails against jdk7 Reviewed-by: malenkov
jdk/test/javax/swing/JLabel/7004134/bug7004134.java
--- a/jdk/test/javax/swing/JLabel/7004134/bug7004134.java	Thu Apr 14 15:59:47 2011 +0900
+++ b/jdk/test/javax/swing/JLabel/7004134/bug7004134.java	Thu Apr 14 12:37:11 2011 +0400
@@ -52,7 +52,13 @@
                 frame.add(label);
                 frame.pack();
                 frame.setVisible(true);
+            }
+        });
 
+        ((SunToolkit) SunToolkit.getDefaultToolkit()).realSync();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
                 ToolTipManager toolTipManager = ToolTipManager.sharedInstance();
 
                 toolTipManager.setInitialDelay(0);
@@ -83,7 +89,13 @@
                             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                             frame.pack();
                             frame.setVisible(true);
+                        }
+                    });
 
+                    ((SunToolkit) SunToolkit.getDefaultToolkit()).realSync();
+
+                    SwingUtilities.invokeAndWait(new Runnable() {
+                        public void run() {
                             ToolTipManager toolTipManager = ToolTipManager.sharedInstance();
 
                             toolTipManager.setInitialDelay(0);