jdk/test/javax/swing/SwingTest.java
changeset 27764 4e79ff3e0602
parent 5506 202f599c92aa
--- a/jdk/test/javax/swing/SwingTest.java	Mon Nov 10 16:23:30 2014 +0300
+++ b/jdk/test/javax/swing/SwingTest.java	Mon Nov 10 16:37:40 2014 +0300
@@ -21,7 +21,6 @@
  * questions.
  */
 
-import sun.awt.SunToolkit;
 import java.awt.Toolkit;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -134,11 +133,8 @@
             else {
                 SwingUtilities.invokeLater(this); // invoke on the event dispatch thread
             }
-            Toolkit tk = Toolkit.getDefaultToolkit();
-            if (tk instanceof SunToolkit) {
-                SunToolkit stk = (SunToolkit) tk;
-                stk.realSync(); // wait until done
-            }
+            java.awt.Robot robot = new java.awt.Robot();
+            robot.waitForIdle();
         }
         while (this.frame != null);
         if (this.error != null) {