• Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaFX - which layouts to use for this mockup  RSS feed

Andreas Spetebach
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

for school I am working on a project where I need to make a gui with JavaFX.

Now I need help... I made a mockup of the GUI (see attachment)
It contains of a:
- Menubar at the top
- ComputerKeyboard
- a Piano Keyboard

The important thing is, that when resizing the Window (Stage)
the aspect of all elements should stay the same...
I have no Idea how to do this with the layouts of JavaFX 8...

I appreciate any idea... thank you!
[Thumbnail for gui.jpg]
John Damien Smith
Ranch Hand
Posts: 352
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may find these posts helpful on some techniques you may wish to use to get the resizing working:

Other than that, probably use SceneBuilder to transfer your mockup to FXML and CSS.
Just play around with SceneBuilder to get to understand JavaFX layout mechanisms.

Other than that, read the Oracle Layout tutorials:

Avoid AnchorPane usage as that is generally for a fixed size layout rather than a dynamic layout.

You don't have a lot of experience with this.  Start with a much simpler UI and get that completely working, not just from a layout perspective, but also from a functional perspective before attempting to create the entire UI for your project.  For example, just get one of the parts working how you want (the menu, the alpha keyboard or the piano keyboard).  Expect it all to take sooo much longer than you expect it to.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!