这段代码 http://docs.oracle.com/javase/8/javafx/graphics-tutorial/camera.htm#CJAHFAHB将创建一个 300x300 大的 3D 场景。当我调整包含窗口/舞台的大小时,视口不会调整大小。
Parent
没有任何width
or height
特性。如何调整大小Parent
and/or SubScene
改变窗口大小?
将其绑定到父级
SubScene subscene = new SubScene(root, 1024, 768, true, null);
subscene.setFill(Color.GREY);
subscene.setCamera(camera);
StackPane stackPane = new StackPane();
stackPane.getChildren().add(subscene);
subscene.heightProperty().bind(stackPane.heightProperty());
subscene.widthProperty().bind(stackPane.widthProperty());
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)