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

+20 votes

I was looking through the various built-in layout panes in JavaFX and was wondering about the advantages of using BorderPane over GridPane. Which layout do you guys also believe will be best for the project?

asked in CSC305 Fall 2022 by (1 point)
–2

-- Didn't mean to comment here --

3 Answers

+10 votes

I like to use BorderPane because it allows us to insert elements in left/center/right/up/down sections without having to deal with the resizing of elements when you go full screen, because they adjust automatically.

answered by (1 point)
+1

Yes, I have been using BorderPane too, and it has been wonderful! Thank you!

+8 votes

We are using/planning to use a mix of BorderPanes and GridPanes. In my experience, the former is better for things like toolbars while the latter is better for more central-screen layouts.

answered by (1 point)
+1

Oh thanks for your advice, for my team we are thinking of using HBox for toolbars and it has been easy to manipulate too!

+7 votes

I third for borderPanes and second for gridPanes, they help in positioning objects so much better than say a vBox.

answered by (1 point)
...