--- old/modules/swing/src/main/java/javafx/embed/swing/JFXPanel.java 2016-04-05 16:34:31.000000000 -0700 +++ new/modules/swing/src/main/java/javafx/embed/swing/JFXPanel.java 2016-04-05 16:34:31.000000000 -0700 @@ -208,11 +208,6 @@ // Initialize FX runtime when the JFXPanel instance is constructed private synchronized static void initFx() { // Note that calling PlatformImpl.startup more than once is OK - AccessController.doPrivileged((PrivilegedAction) () -> { - System.setProperty("glass.win.uiScale", "100%"); - System.setProperty("glass.win.renderScale", "100%"); - return null; - }); PlatformImpl.startup(() -> { // No need to do anything here }); @@ -683,6 +678,9 @@ } if (pixelsIm == null) { createResizePixelBuffer(scaleFactor); + if (pixelsIm == null) { + return; + } } DataBufferInt dataBuf = (DataBufferInt)pixelsIm.getRaster().getDataBuffer(); int[] pixelsData = dataBuf.getData(); @@ -712,7 +710,7 @@ if (scaleFactor != newScaleFactor) { createResizePixelBuffer(newScaleFactor); // The scene will request repaint. - scenePeer.setPixelScaleFactor(newScaleFactor); + scenePeer.setPixelScaleFactors(newScaleFactor, newScaleFactor); scaleFactor = newScaleFactor; } } catch (Throwable th) { @@ -906,7 +904,7 @@ if (pWidth > 0 && pHeight > 0) { scenePeer.setSize(pWidth, pHeight); } - scenePeer.setPixelScaleFactor(scaleFactor); + scenePeer.setPixelScaleFactors(scaleFactor, scaleFactor); invokeOnClientEDT(() -> { dnd = new SwingDnD(JFXPanel.this, scenePeer);