[英]How to add Anchor Pane constrains in javafx code?
我知道你可以在fxml中添加Anchor Pane包含:'AnchorPane.bottomAnchor =“0.0”'但是你可以在java代码中设置AnchorPane约束吗?
There are a set of static methods on AnchorPane which you call with the node and the constraint. AnchorPane上有一组静态方法,您可以使用节点和约束调用它们。
Example 例
AnchorPane.setBottomAnchor(button, 0.0);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.