--- old/src/java.desktop/share/classes/java/awt/Robot.java 2014-09-04 14:49:49.275998547 +0400 +++ new/src/java.desktop/share/classes/java/awt/Robot.java 2014-09-04 14:49:49.118995964 +0400 @@ -580,6 +580,17 @@ } /** + * Synchronizes this toolkit's graphics state. Some window systems + * may do buffering of graphics events. + *

+ * This method tries to ensure that the display is up-to-date. + */ + public static synchronized void sync() { + SunToolkit.flushPendingEvents(); + ((SunToolkit) Toolkit.getDefaultToolkit()).realSync(); + } + + /** * Returns a string representation of this Robot. * * @return the string representation.