Recently I moved everything related to the project I'm developing from windows to mac, but I'm having some problems, two actually, using the useSystemMenuBar
The first one is less critical, a "java" menu appears left sided with my first menu item. I tried and looked how to solve this by googling but it's not like there are tons of javafx 2 mac developers out there.
The second one is a critical one though, whenever I activate one of my windows the menu bar hides and again, only the "java" menu item appears on the mac menu bar. Here's the code which I initialize the menu bar:
public void start(Stage stage) throws Exception
primaryStage = StageHandler.getStage();
MenuBar menuBar = FXMLLoader.load(getClass().getResource("/fxml/MainWindow.fxml"), Resources.getBundle("bundle.MainWindow"));
Scene scene = new Scene(menuBar, WIDTH, HEIGHT, Color.TRANSPARENT);
HBox hbox = new HBox();
TronBox root = new TronBox(WIDTH, HEIGHT, false);
final Popup popup = getAlwaysOnTop(root);
I also got the "java" Menu problem and mentioned it here in some Mac OS thread, but nobody answered.
The second problem is probably normal, because a new Stage has a new Scene and therefore new children. You probably have to add the menu to each Scene in each Window.
Make a global Menu for that and pass it to each Window.
Hmmm, it's an interesting approach, thanks for helping. I actually tried to change my perspective about the application class and figured a way, load my fxml into a popup root node and then display it. The problem is the css, since there's no scene on a popup. I tried before but it was somewhat odd since the popup rendered the css from the Root node (the main menu in this case) which is fully understandable. I'll give a try to the static menus and post the results.