Example usage for javafx.scene.layout FlowPane getPrefWrapLength

List of usage examples for javafx.scene.layout FlowPane getPrefWrapLength

Introduction

In this page you can find the example usage for javafx.scene.layout FlowPane getPrefWrapLength.

Prototype

public final double getPrefWrapLength() 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20);
    flowPane.setPrefWrapLength(210);/*from   ww w  .j a v  a2  s.c  om*/
    Button btn = new Button();

    for (int i = 0; i < 8; i++) {
        btn = new Button("Button");
        btn.setPrefSize(100, 50);
        flowPane.getChildren().add(btn);
    }
    System.out.println(flowPane.getPrefWrapLength());

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