Example usage for javafx.geometry VPos BASELINE

List of usage examples for javafx.geometry VPos BASELINE

Introduction

In this page you can find the example usage for javafx.geometry VPos BASELINE.

Prototype

VPos BASELINE

To view the source code for javafx.geometry VPos BASELINE.

Click Source Link

Document

Indicates baseline vertical position.

Usage

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20);
    flowPane.setPrefWrapLength(210);//w  w w .  jav a 2s .co  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.setRowValignment(VPos.BASELINE);

    Scene scene = new Scene(flowPane);
    primaryStage.setScene(scene);
    primaryStage.show();
}