何らかの理由でtextExampleTwo.setLayoutX(40)
が実際にはText
を右に動かすことはありません。これはバグですか、私はここで重要なことを逃しましたか?.setLayoutX()はFlowPaneの位置に影響しません
public void start(Stage stage) throws Exception {
FlowPane flowPane = new FlowPane();
flowPane.setOrientation(Orientation.VERTICAL);
Text textExampleOne = new Text("An example - 1");
Text textExampleTwo = new Text("An example - 2");
textExampleTwo.setLayoutX(40.0);
flowPane.getChildren().addAll(textExampleOne, textExampleTwo);
Scene applicationScene = new Scene(flowPane);
stage.setHeight(400.0);
stage.setWidth(400.0);
stage.setScene(applicationScene);
stage.show();
}
ああ、助けてくれてありがとう!私が尋ねたいもう一つのことがありますが、ペインのためにこれを行うことはできますか? –
ペインの種類によって異なります... – fabian