<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 6, 2023, at 4:35 PM, Michael Hall <<a href="mailto:mik3hall@gmail.com" class="">mik3hall@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">I haven’t verified if this would further allow changing the java.awt.Desktop about handler.<span class="Apple-converted-space"> </span></span></div></blockquote></div><br class=""><div class="">I did check that custom AboutHandlers are possible for OS/X JavaFX applications. </div><div class="">With…</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>static {<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>//java.awt.Toolkit.getDefaultToolkit(); // Start AppKit<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Thread t = new Thread(() -> { java.awt.Toolkit.getDefaultToolkit(); });<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span>t.start(); <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div class=""><br class=""></div><div class="">I made the Application class itself the handler…</div><div class=""><br class=""></div><div class="">public class HelloWorld extends Application implements AboutHandler {</div><div class=""><br class=""></div><div class="">Setting the handler seemed to also need some thread management.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>@Override<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>public void init() {<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span>Thread t = new Thread(() -> {<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Desktop desktop = Desktop.getDesktop();<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>desktop.setAboutHandler((AboutHandler)this); <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>});<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>t.start();<span class="Apple-tab-span" style="white-space:pre"> </span> <span class="Apple-tab-span" style="white-space:pre"> </span><br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div class=""><br class=""></div><div class="">It appeared this could be done in the init or about anywhere in the javaFX start method.</div><div class=""><br class=""></div><div class="">The handler I think comes in on the AWT EventQueue so needs to be changed to javaFX</div><div class=""><br class=""></div><div class=""> public void handleAbout(AboutEvent evt) {<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span>System.out.println("got to handleAbout");<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span>Platform.runLater(() -> {<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span>Alert alert = new Alert(AlertType.INFORMATION, "About HelloWorld");<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>alert.showAndWait();<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>});<br class=""> }</div><div class=""><br class=""></div><div class="">Checking on Windows 10 VirtualBox it appeared Desktop.Action.APP_ABOUT isn’t supported. </div><div class="">I had trouble with my VirtualBox linux images so didn’t verify there but I’m guessing this is viewed as OS/X only and not supported there either.</div><div class=""><br class=""></div><div class="">I never really did determine why javaFX applications are different. My last thought had been that they instantiated an NSApplication early so a NSApplicationAWT wss never obtained. However, I later thought I saw where I passed a check indicating I had to have NSApplicationAWT. With a fix so you get the About menu item it seemed a little moot. What I provided for ApplicationDelegate seems to be one such fix. You can come up with your own fix but I think it will need to done jdk side though to provide this functionality to javafx app’s. I might bring this up on the javafx list if the jdk does make it possible at some point.</div><div class=""><br class=""></div><div class="">I haven’t looked at any other Desktop functionality for javafx app’s yet having no immediate need myself. </div></body></html>