1
私はjavaFxで作業しています。私はstackPaneのサイズを変更したい、または境界を追加したいのですが、どうすればいいですか? と私はどのようにセンターまたは私のウィンドウに配置することができますか?javafxのstackpaneをCSSでサイズ変更
これは私のコードです:
final HBox box = new HBox();
box.getStyleClass().add("box");
final ToolBar outils = new ToolBar();
final Button file = new Button("fichier");
final Button as2 = new Button("AS2");
final Button ftp = new Button("FTP");
final Button arrow = new Button("Liaison");
file.setGraphic(new ImageView("/images/file.png"));
as2.setGraphic(new ImageView("/images/http.png"));
ftp.setGraphic(new ImageView("/images/ftp.png"));
arrow.setGraphic(new ImageView("/images/Arrow.png"));
box.getChildren().addAll(file,as2,ftp,arrow);
outils.getItems().addAll(box);
// ma zone de dessin
final StackPane paint = new StackPane();
paint.setStyle("-fx-background-color: #FFFFFF;");
paint.setPrefSize(0, 690);
paint.getStyleClass().add("paint");
、これが私の窓です:
TKS
あなたの答えのためのTKS、それは高さのために動作しますが、私はしてサイズを変更することはできませんし、それは私が – girly49
を何をしたいのか、私はあなたのFXMLファイルの幅プロパティのチェク考える幅のための仕事でなければならないのですまたはcssファイルがある場合は、それはブロックすることができます値を設定します。 私の悪い英語のためのsory –