'How to change javafx stage top region

I want to use javaFx to make stage top region like IDEA menu bar,but i can not find any api in stage to set node .Second picture is my app,the menu bar is in BorderPane top,how to move to stage top?

enter image description here

enter image description here



Solution 1:[1]

a possible option is to use a window without decoration stage.initStyle(StageStyle.UNDECORATED); by doing this you remove the 3-buttons and will have an empty stage so you can control it and add whatever you want and for more info you can find an example that serve your case inside this link:
JavaFx add Window-Control-Buttons to Menubar (IntelliJ like)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1