<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">On the Mac the JavaFX core creates the application menu, the one immediately adjacent to the Apple menu in the menu bar. There is no JavaFX API to access it so a developer can’t localize the existing items or add additional ones (like About). We can’t easily provide access to it since it’s not built using public Controls. While thinking about how to fix this I realized the simplest approach would be to just remove it entirely and let the developer build their own.<div><br></div><div>Before macOS Snow Leopard (10.6, circa 2009) the application menu was created by the OS and you had to issue special calls to replace it. Now it’s simply the first item in the NSApplication’s mainMenu. If the system menu bar is enabled removing the built-in application menu simply shifts the JavaFX MenuBar menus over so the first menu becomes the application menu.</div><div><br></div><div>Unfortunately we would need to fill some holes in the JavaFX API to make this a useful solution. Currently the system tears down the system menu bar when a Stage is iconified and there’s no way to specify a menu bar to be displayed when there’s no Stage. There should be an API that allows a developer to provide a default menu bar to display in these situations. Any suggestions on what that would look like are welcome.</div><div><br></div><div>I pulled together a rough draft as a proof of concept (<a href="https://git.openjdk.org/jfx/pull/1737">https://git.openjdk.org/jfx/pull/1737</a>). It adds a new property to the MenuBar that allows the developer to shut off the default application menu. It also provides the calls necessary to implement the standard Hide, Hide Others, and Show All items that usually appear in the app menu.</div><div><br></div><div>Let me know if you have any thoughts or feedback.</div><div><br></div><div>Martin</div><div><br></div></body></html>