Back to course

Intro to Layouts: HBox and VBox

JavaFX 0 to Hero

Intro to Layouts: HBox and VBox

Layouts arrange components automatically.

  • HBox: Arranges children in a single horizontal row.
  • VBox: Arranges children in a single vertical column.

Spacing can be set using setSpacing(double).