Is it possible to change the application icon using JavaFX, or does it have to be done using Swing?
If you have have a images folder and the icon is saved in that use this
stage.getIcons().add(new Image(.class.getResourceAsStream("/images/comparison.png")));
and if you are directly using it from your package which is not a good practice use this
stage.getIcons().add(new Image(.class.getResourceAsStream("comparison.png")));
and if you have a folder structure and you have your icon inside that use
stage.getIcons().add(new Image(.class.getResourceAsStream("../images/comparison.png")));