Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想设置 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);