我正在试图找出FXML调用--等价于JavaFX AnchorPane.topAnchor (以及底部、右侧、左锚)属性。通常,FXML属性似乎是对象上的属性,但似乎不存在AnchorPane类型属性或任何其他返回此类型对象的属性。
例如,如果我有以下FXML
<BorderPane fx:id="borderPane" AnchorPane.bottomAnchor="4.0"
AnchorPane.leftAnchor="4.0"
AnchorPane.rightAnchor="4.0"
AnchorPane.topAnchor="30.0"> .... more FXML here设置锚窗格锚的相关Java调用是什么?
例如:
BorderPane borderPane = new BorderPane();
//
// What method calls on borderPane would set the anchors?
//谢谢你的指点。
发布于 2014-02-12 18:02:26
AnchorPane.setLeftAnchor(borderPane, 4.0); 等
见介绍FXML,静态属性部分。
https://stackoverflow.com/questions/21735559
复制相似问题