RFR: 8299423: JavaFX Mac system menubar leaks [v5]
Michael Hall
mik3hall at gmail.com
Tue Jan 17 00:19:42 UTC 2023
Not directly related but I recently was looking at the Mac system menubar for javaFX applications noticing that they do not get an ‘About’ menu item in the Application menu.
I filed a bug that was just accepted today.
JDK-8300180 : [macos] Default About menu item not shown for javaFX applications
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8300180 <https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8300180>
It involves changes to some of the legacy Apple code (ApplicationDelegate.m) and changes to the javaFX application to initialize this code and also to use java.awt.Desktop.
I was able to get javaFX applications an ‘About’ menu item by default, as all Mac applications including jpackage Swing ones do.
Also with additional changes I was able to use java.awt.Desktop to get a custom aboutHandler for this menu item for applications that want to provide their own.
I had tried doing this with just javaFX by simply getting a menubar and setting it to system, but this didn’t work. Possibly there is more to this that I should of done?
I might look a little at what javaFX has for the Mac system menubar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20230116/e8fbb921/attachment.htm>
More information about the openjfx-dev
mailing list