Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+9 votes

I read the textbook, and I am still struggling to fully understand what the difference is between the two

asked in CSC 305 Fall 2024 by (660 points)

2 Answers

+6 votes
 
Best answer

HBox containers are horizontal and on the top or bottom, whilst VBox containers are vertical and on the left or right.

answered by (718 points)
selected by
+6 votes

They are both containers of nodes, but they differ in how the nodes are displayed. Your nodes (botton, label, etc.) appears on a row in Hbox, while they will appears on a column in VBox.

Here's the source: https://docs.oracle.com/javafx/2/layout/builtin_layouts.htm

answered by (1.5k points)
...