List of usage examples for javafx.scene.layout FlowPane setOrientation
public final void setOrientation(Orientation value)
From source file:Main.java
@Override public void start(Stage primaryStage) { FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20); flowPane.setPrefWrapLength(210);/*from w ww .j a v a 2s . c o m*/ Button btn = new Button(); for (int i = 0; i < 8; i++) { btn = new Button("Button"); btn.setPrefSize(100, 50); flowPane.getChildren().add(btn); } flowPane.setOrientation(Orientation.HORIZONTAL); Scene scene = new Scene(flowPane); primaryStage.setScene(scene); primaryStage.show(); }