Is it possible to change the application icon using JavaFX, or does it have to be done using Swing?
If you run the jar file, the code specified by Michael Berry will change the icon in the title bar and in the taskbar. Shortcut icon cannot be changed.
If you run a native program compiled with com.zenjava, You must add a link to the program icon:
com.zenjava
javafx-maven-plugin
8.8.3
...
${project.basedir}/src/main/resources/images/filename.ico
This will add an icon to the shortcut and taskbar.