Formating of Buttons in a Border Pane

Roger Wells

Ranch Hand

Posts: 51

1

posted 3 months ago

I am trying to learn how to create a ui

I am having problems understanding how to format this screen.

1. How do I center the top heading and have it always be centered within the scene when the user changes the size?
2. How do I get the 3 bottom buttons to have one on the left, one in the center, and one on the right and stay that way when the user changes the scene size?

Roger Wells

Ranch Hand

Posts: 51

1

posted 3 months ago

I also want to add a grid pane to the left and a textarea to the right and replace the buttons.
Both grid and text should be scrolable

There's usually a small window in which you can edit a post before someone replies, but for the most part, you should post again to the thread -- not the entire post, but just the correction. This is so that the replies don't become confusing if they refer to a part of the post that is now different.

I also want to add a grid pane to the left and a textarea to the right and replace the buttons.
Both grid and text should be scrolable

Are you having problems with that? What have you tried and what happened? Do you have a specific question about this?

All things are lawful, but not all things are profitable.

John Damien Smith

Ranch Hand

Posts: 299

15

posted 3 months ago

AnchorPanes aren't good for modeling resizable UIs. You are probably better off using a different container type.
You can better understand JavaFX container types and layout tips by reading the Oracle layout documentation:
http://docs.oracle.com/javase/8/javafx/layout-tutorial/

John Damien Smith

Ranch Hand

Posts: 299

15

posted 3 months ago

Also try playing around with SceneBuilder and it's preview option to help understand how layouts work in JavaFX.