apps/samples/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SubSceneResizer.java

Print this page

        

@@ -80,10 +80,10 @@
         final double height = getHeight();
         if (subScene!=null) {
             subScene.setWidth(width);
             subScene.setHeight(height);
         }
-        final int controlsWidth = (int)snapSize(controlsPanel.prefWidth(-1));
-        final int controlsHeight = (int)snapSize(controlsPanel.prefHeight(-1));
+        final double controlsWidth = snapSizeX(controlsPanel.prefWidth(-1));
+        final double controlsHeight = snapSizeY(controlsPanel.prefHeight(-1));
         controlsPanel.resizeRelocate(width-controlsWidth,0,controlsWidth,controlsHeight);
     }
 }