Example usage for javafx.scene.layout VBox setLayoutY

List of usage examples for javafx.scene.layout VBox setLayoutY

Introduction

In this page you can find the example usage for javafx.scene.layout VBox setLayoutY.

Prototype

public final void setLayoutY(double value) 

Source Link

Usage

From source file:User.java

@Override
public void start(Stage primaryStage) {
    this.primaryStage = primaryStage;
    user = new User();

    primaryStage.initStyle(StageStyle.TRANSPARENT);

    root = new Group();
    Scene scene = new Scene(root, 320, 112, Color.rgb(0, 0, 0, 0));

    primaryStage.setScene(scene);// ww w  .  j a va  2s .  c  o m

    Rectangle background = this.drawRectangleBackground();
    HBox row1 = this.drawRow1();
    HBox row2 = this.drawRow2();

    VBox formLayout = new VBox(4); // spacing
    formLayout.setLayoutX(12);
    formLayout.setLayoutY(12);

    formLayout.getChildren().addAll(row1, row2);

    root.getChildren().addAll(background, formLayout);

    primaryStage.show();
}