--- old/modules/javafx.swing/src/main/java/com/sun/javafx/embed/swing/SwingFXUtilsImpl.java 2018-05-05 14:08:58.114668000 +0530 +++ new/modules/javafx.swing/src/main/java/com/sun/javafx/embed/swing/SwingFXUtilsImpl.java 2018-05-05 14:08:57.334666700 +0530 @@ -33,8 +33,7 @@ import java.security.PrivilegedAction; import java.util.concurrent.atomic.AtomicBoolean; import javafx.application.Platform; -import sun.awt.AWTAccessor; -import sun.awt.FwDispatcher; +import jdk.swing.interop.DispatcherWrapper; public class SwingFXUtilsImpl { @@ -65,7 +64,7 @@ } } - private static class FXDispatcher implements FwDispatcher { + private static class FXDispatcher extends DispatcherWrapper { @Override public boolean isDispatchThread() { @@ -90,11 +89,11 @@ //Called with reflection from PlatformImpl to avoid dependency public static void installFwEventQueue() { - AWTAccessor.getEventQueueAccessor().setFwDispatcher(getEventQueue(), new FXDispatcher()); + DispatcherWrapper.setFwDispatcher(getEventQueue(), new FXDispatcher()); } //Called with reflection from PlatformImpl to avoid dependency public static void removeFwEventQueue() { - AWTAccessor.getEventQueueAccessor().setFwDispatcher(getEventQueue(), null); + DispatcherWrapper.setFwDispatcher(getEventQueue(), null); } }