基本的な違いは何ですか?
私がこのようにすると
Button button = new Button();
button.setPrefWidth(50);
button.setMaxWidth(Double.MAX_VALUE);
ボタンは幅 50 で表示され、無限に拡張できると考える人もいるでしょうが、ボタンが画面の全幅を占めるということです。
彼らの意図を知っている人はいますか?
私のボーダーペインコード:
borderPane.setPadding(new Insets(10,10,10,10));
borderPane.setCenter(button);
borderPane.getStyleClass().add("bpane");
//Region region = (Region) anyNode;
button.setStyle("-fx-background-color: red;");