JavaFX app in System Tray

Wrap the code in the actionListener which calls back to JavaFX in Platform.runLater. This will execute the code which interfaces with the JavaFX system on the JavaFX application thread rather than trying to do it on the Swing event thread (which is what is causing you issues). For example: ActionListener listenerTray = new ActionListener() { … Read more