changeset 3967:cf5d466be0bd

7032911: javax/swing/JLabel/7004134/bug7004134.java test fails against jdk7 Reviewed-by: malenkov
author rupashka
date Thu, 14 Apr 2011 12:37:11 +0400
parents 21fa255f0edf
children d42338742583
files test/javax/swing/JLabel/7004134/bug7004134.java
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/swing/JLabel/7004134/bug7004134.java	Thu Apr 14 15:59:47 2011 +0900
+++ b/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);