I’m trying to change the default java icon that appears in taskbar everytime I run my .jar program. I managed to change it with frame.setIconImage(img); but this makes icon way too small, I want it to be as big as other programs icons and have a high quality. Any way I can do that? Thanks.
Share
As you only supplied a single icon, Windows will then scale that icon to whatever size it needs displaying it in the taskbar (could be 16×16, 32×32 or other sizes, depending on the desktop them and size of the taskbar.
If you want to have a “good looking” icon in the task bar you will need to provide a 32×32 pixel version of your icon.
Once you have that you can call
setIconImages(List)instead ofsetIconImage()to define the icons that the operating system can use:Where
getImage()is some method returning the proper image icon. Essentially that would be the same steps you already used to define the current icon.You can also supply a 64×64 and 24×24 icon using this method (just add more icons to the list).