6 Replies Latest reply on Jun 27, 2012 7:51 PM by 921851

    Javafx 2.1: useSystemMenuBar issues (Mac)

      Hi All,

      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"));
                     primaryStage.getIcons().add(new Image(getClass().getResource("/icons/logo.png").toString()));
                     Scene scene = new Scene(menuBar, WIDTH, HEIGHT, Color.TRANSPARENT);
                     HBox hbox = new HBox();
                     TronBox root = new TronBox(WIDTH, HEIGHT, false);
                     primaryStage.getIcons().add(new Image(getClass().getResource("/icons/logo.png").toString()));
                     final Popup popup = getAlwaysOnTop(root);