On Mon, 4 May 2026 18:20:30 GMT, Christopher Schnick <[email protected]> wrote:
>> @crschnick If I understand you correctly in the past calling >> `Desktop.getDesktop().setPreferencesHandler()` would ensure that a >> Preferences item showed up in the system application menu. I can't reproduce >> that behavior. I've taken your MenuBar.java sample code and run it with JDK >> 21 and JavaFX 17 and other combinations and can't get that to happen. No >> matter what I do I only see the JavaFX application menu (4 items), never >> the AWT one (at least 6). >> >> BTW I'm testing your MenuBar.java outside of the jfx-runner gradle system. >> I've already got my own shell scripts that allow me to switch between >> different JFX and Java versions. I did need to tweak MenuBar.java to make >> `main` public. > > @beldenfox Do you mean that you don't see any menu bar entry in general, or > only for this specific case where the order of execution is different? > > I know that the menu bar entries were correctly shown in the past in earlier > JDK, JavaFX, and macOS versions. I don't have an older macOS system than 26, > so I can't test it going back. > > I also noticed that the Desktop setAboutHandler() method seems to be broken > in general for AWT for macOS 26, so maybe this is more related to the macOS > version as that method worked for earlier versions as well. @crschnick I never see the Settings menu item regardless of order of execution. This is true even in older versions of JavaFX, long before this PR came along. To see the Settings menu item in a JavaFX app you need to initialize it so AWT creates the application menu instead of JavaFX. I don't see how you can do that with test code you provided even in earlier versions of JavaFX. I would like to look into this but need a stand-alone program that reproduces the problem e.g. that shows the Settings menu in an older version of JavaFX but not in the current version. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1904#issuecomment-4380637095
