Application Window – setIcons

Hey there, :slight_smile:

I’ve tried to set my own icon instead of the default one. In the wiki, I found this way:

[java]settings.setIcons(new BufferedImage[]{GameInfo.ICON});[/java]

(This is executed before the app starts - I’ve called “setShowSettings(false);” and handle things like resolution etc. in this method (I’m sure my fault isn’t there, cause things like loading the resolution and other settings at this points work))

GameInfo.ICON is a BufferedImage, the toString-method says:

BufferedImage@152f43b: type = 6 ColorModel: #pixelBits = 32 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@1205d8d transparency = 3 has alpha = true isAlphaPre = false ByteInterleavedRaster: width = 256 height = 256 #numDataElements 4 dataOff[0] = 3

First, I had an image of the size 200x200, so I thought maybe jME only supports 2^n sizes at the moment, but even resizing it to 256 or 128 doesn't help. :(
I already searched in the forums, Google and the javadocs, but found nothing that helped.

Here's a link to my image:

Yours, destro :)

Those icons are way too big and no scaling will be performed. It will pick whatever version is the right size to fit up in the little corner of the window. I guess some platforms may use the larger ones for some things.

I include a 16x16, 32x32, and 128x128 in mine and I have an icon in the upper left.

Thank you for the quick response, it worked perfectly. :slight_smile:

I thought that jME will check automatically from the best solution to the worst and takes the first icon it finds. Too bad I stopped testing after the 128px one^^

As I said before, thank you very much, I’m always surprised how active the JMonkey community is. :smiley: