SimpleJava
asked on
Java cup of tea icon
Hi experts
How can i replace the small java cup of tea icon that shows on JFrames with my own icon say in .jpg format ? How do i know the actual size of this tiny image and in which format is it?
How can i replace the small java cup of tea icon that shows on JFrames with my own icon say in .jpg format ? How do i know the actual size of this tiny image and in which format is it?
>
just change the imageicon for the frame, it get's scaled, but 16X16 pixels is usualy good
just change the imageicon for the frame, it get's scaled, but 16X16 pixels is usualy good
btw, java will load most of the popular image formats using CEHJ's method
ASKER
Thanks but i'm getting an uncaught error fetching image which says something about java.lang.NullPointerExcep tion
ASKER
I have the image in the same directory as the main class to give some further information
ASKER
> just change the image icon for the frame
riaancornelius where is the image icon for the frame located ?
riaancornelius where is the image icon for the frame located ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
method setImageIcon() cannot be resolved!!!!
ASKER
>> correction your setImageIcon() is supposed to be setIconImage().=)
i guess it was a typo.
Works fine. Thank you CEHJ.
But where is the image for the frame located ?
i guess it was a typo.
Works fine. Thank you CEHJ.
But where is the image for the frame located ?
>>But where is the image for the frame located ?
Not sure but wouldn't be surprised if it were in a runtime binary
Not sure but wouldn't be surprised if it were in a runtime binary
ASKER
Thank you. Will try and find out.
:-)
setIconImage(Toolkit.getDe