Link to home
Start Free TrialLog in
Avatar of yongsing
yongsing

asked on

Changing system menu icon of JFrame

Hi,

I would like the icon for the system menu of a JFrame changed to my own custom icon. What I need to know is what kind of image file I need for the icon. Can a .GIF file do? And what resolution should it be?

Also, suppose my java application runs on a Windows system, and I want to create a custom desktop icon to launch my application. How do I make that icon? From what I can tell from a normal .EXE program, the icon is stored inside the .EXE file.
ASKER CERTIFIED SOLUTION
Avatar of heyhey_
heyhey_

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yongsing
yongsing

ASKER

But what pixel resolution should the system.gif file be? Should it be 16 x 16 or 32 x 32?
I suppose that the image will be automatically resized ...


public synchronized void setIconImage(Image image)

Sets the image to display when this frame is iconized. Not all platforms support the concept of iconizing a window.

Parameters:
image - the icon image to be displayed
You can use frame.getIconImage() to get the default one and check its size, but there are probably better solutions :-)
:)

well, actually I don't remember the size ... :) but I suppose that every Image object will be automatically resized.