1

My JavaFX applications look even more different between Windows and OSX than I'd like, as the title text on the mac is centered, but on Windows its left aligned. Ideally I want to make both centered. Compare OSX http://i.imgur.com/48YGy5D.png with Windows: http://i.imgur.com/alvWo2n.png

Of course, I'd like to know if anyone has found a way to get around this default?

Many thanks,

SystemsInCode
  • 629
  • 7
  • 19

1 Answers1

2

The best way I have found is to make an undecorated window and add my own title bar to the top of the frame, this way I have full control over everything and the OS/platform will never interfere with the layout.

See here for more info on one way you could do this: How to create customize title bar with close button on jFrame?

Community
  • 1
  • 1
sorifiend
  • 5,927
  • 1
  • 28
  • 45
  • 2
    ok, shame the javafx people didn't give a us a way to do it, .but I guess it keeps it looking 'native'. The link is for swing but I guess the same approach will work. Thanks. – SystemsInCode Apr 29 '16 at 07:10