jdk/test/java/awt/GridBagLayout/GridBagLayoutIpadXYTest/GridBagLayoutIpadXYTest.java
changeset 27763 1fba965925e8
parent 5506 202f599c92aa
--- a/jdk/test/java/awt/GridBagLayout/GridBagLayoutIpadXYTest/GridBagLayoutIpadXYTest.java	Sun Nov 09 22:17:45 2014 +0300
+++ b/jdk/test/java/awt/GridBagLayout/GridBagLayoutIpadXYTest/GridBagLayoutIpadXYTest.java	Mon Nov 10 16:23:30 2014 +0300
@@ -71,7 +71,14 @@
         frame.pack();
         frame.setVisible(true);
 
-        ((sun.awt.SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+        Robot robot;
+        try {
+            robot = new Robot();
+            robot.waitForIdle();
+        }catch(Exception ex) {
+            ex.printStackTrace();
+            throw new RuntimeException("Unexpected failure");
+        }
 
         Dimension minSize = jtf.getMinimumSize();
         if ( minSize.width + customIpadx != jtf.getSize().width ||