【发布时间】:2013-08-26 10:23:16
【问题描述】:
我想设置 BorderPane 的 Center、Top、Left、Right 和 Bottom 组件的大小。
到目前为止,我发现了这个:
BorderPane() mainpane = new BorderPane();
mainPane.getBottom().prefWidth(sizeX);
例如,如何获取 BorderPane 左侧的大小并设置大小?
【问题讨论】:
我想设置 BorderPane 的 Center、Top、Left、Right 和 Bottom 组件的大小。
到目前为止,我发现了这个:
BorderPane() mainpane = new BorderPane();
mainPane.getBottom().prefWidth(sizeX);
例如,如何获取 BorderPane 左侧的大小并设置大小?
【问题讨论】:
BorderPane 的“左侧”是你设置的任何值,它的大小是你设置的任何值。
示例:
BorderPane mainpane = new BorderPane();
StackPane left = new StackPane();
left.setPrefWidth(100);
mainPane.setLeft(left);
【讨论】: