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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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.
well, actually I don't remember the size ... :) but I suppose that every Image object will be automatically resized.
ASKER