Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaFX - which layouts to use for this mockup

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

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!
gui.jpg
[Thumbnail for gui.jpg]
mockup
 
John Damien Smith
Ranch Hand
Posts: 299
14
  • 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:
  http://stackoverflow.com/questions/23229149/javafx-automatic-resizing-and-button-padding
  http://stackoverflow.com/questions/16606162/javafx-fullscreen

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.
  http://gluonhq.com/labs/scene-builder/

Other than that, read the Oracle Layout tutorials:
  http://docs.oracle.com/javase/8/javafx/layout-tutorial/

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