List of usage examples for javafx.scene.layout VBox getContentBias
@Override
public Orientation getContentBias()
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("VBox Test"); VBox vb = new VBox(); vb.setPadding(new Insets(10, 50, 50, 50)); vb.setSpacing(10);/*from www . j a v a 2s . co m*/ vb.setFillWidth(true); System.out.println(vb.getContentBias()); Label lbl = new Label("VBox"); lbl.setFont(Font.font("Amble CN", FontWeight.BOLD, 24)); vb.getChildren().add(lbl); Button btn1 = new Button(); btn1.setText("Button1"); vb.getChildren().add(btn1); Button btn2 = new Button(); btn2.setText("Button2"); vb.getChildren().add(btn2); Button btn3 = new Button(); btn3.setText("Button3"); vb.getChildren().add(btn3); Button btn4 = new Button(); btn4.setText("Button4"); vb.getChildren().add(btn4); // Adding VBox to the scene Scene scene = new Scene(vb); primaryStage.setScene(scene); primaryStage.show(); }