I am having some real trouble with JavaFX on my Mac at the moment which originated when experimenting with using the system menubar but has also lead me to discover another problem related to the built in full screen functionality.
Here is what I am doing:
When the application is launched, no menu bar is displayed within the window (as expected) but the Mac system menu bar is still the Netbeans menubar. If I click on the desktop and then back on my application window, the system menubar is correctly displaying the menu from my JavaFX application. I can access the menu and everything now appears to work correctly.
If I relaunch the application, the menu is incorrectly displayed as in the previous example. I use the full screen button on the right hand side of the application window to enter full screen mode. I move my mouse to the top of the screen to show the menu. My application menu is shown but is inaccessible (i.e. I am unable to interact with any of the menus on the menu bar). If i go back into windowed mode the menu bar is now displayed but is still inaccessible. If I follow the steps in the previous example everything now works as expected except for selecting the Quit Java menu option from the Java menu results in the application throwing the following exception.
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException at com.sun.javafx.tk.quantum.GlassViewEventHandler$9.run(GlassViewEventHandler.java:738) at com.sun.javafx.tk.quantum.GlassViewEventHandler$9.run(GlassViewEventHandler.java:720) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleBeginTouchEvent(GlassViewEventHandler.java:720)...
System specifications:
What I have tried
My research has led me to various discussions regarding a conflict between Java 6 and 7 on os x Mavericks, and that I should be installing the update here.
I have carried out the following:
I was also going to try and revert to an older JDK version (update 45 or lower) but you have to sign up for an Oracle account in order to download these versions.
Update:
I have also tried installing Eclipse and using EclipseFX to create the JavaFX project but still observe the same behaviour.
Any help that anyone can offer will be greatly apreciated.
I have just downloaded Java 1.8 which was released today and it appears the problems have been fixed.