Thomas Weller
Thomas Weller

Reputation: 59302

What is the JavaFX equivalent of a WPF StackPanel?

In WPF I used a StackPanel to display one item above another item (vertical orientation) or besides another item (horizontal orientation).

I spent almost an hour achieving the same with the JavaFX StackPane until I found out that the Java-version stacks items in Z-Order instead of X- or Y-Order.

Upvotes: 0

Views: 795

Answers (1)

Thomas Weller
Thomas Weller

Reputation: 59302

The JavaFX VBox (vertical layout) and HBox (horizontal layout) are similar to StackPanel.

Upvotes: 2

Related Questions