Is there any tutorial on how to create custom title bar in javafx 2.0? I am creating a desktop GUI app and want to have a black gradient title bar with custom buttons for minimizing and closing. Here is the tutorial for WPF. I am looking for something similar for javafx
Asked
Active
Viewed 1.9k times
2 Answers
6
To hide platform window:
stage.initStyle(StageStyle.UNDECORATED);
Now you can create your own titlebar/window-buttons & style them.
Finally, check "Ensemble" from Oracle JavaFX samples, they've done the exact thing: http://www.oracle.com/technetwork/java/javafx/samples/index.html

Tangocoder
- 637
- 6
- 16
4
I don't think it's possible to modify the title bar directly. One of the solution could be to remove the platform decorations and add your custom "title bar" to the top of your windows. Here for an example : JavaFX primaryStage remove windows borders?
-
that's a good example. How would I make window move around when user click on the status bar and drag the window around (just like original title bar)? – Ramy Aug 07 '12 at 11:22
-
A little search around can help you : http://stackoverflow.com/questions/11780115/moving-an-undecorated-stage-in-javafx-2 :) – Teocali Aug 07 '12 at 11:43
-
setting stage to undecorated removes window 10 support for quick edge resizing – PathToLife Jan 20 '18 at 13:13