3

I am trying to set an icon for my javaFX application, I tried:

stage.getIcons().add(new Image("/path/fileName.png"));

and

stage.getIcons().add(new Image(<className>.class.getResourceAsStream("/path/fileName.png")));

but both of the options only result in changing my icon in window, not the dock icon. Is there something else I can try?

Thank you

Java 8, OS X El Capitan Version 10.11.4

Kattia
  • 303
  • 4
  • 13
  • http://stackoverflow.com/questions/6006173/how-do-you-change-the-dock-icon-of-a-java-program – Jan Gassen Apr 26 '16 at 13:51
  • Thank you, but the above solution only changes the dock icon to well known black-green exe icon. I have my image in PNG. – Kattia Apr 29 '16 at 11:12

0 Answers0