Re: Giving an application a window icon in a sensible way
- From: "Twisted" <twisted0n3@xxxxxxxxx>
- Date: 21 Nov 2006 06:32:55 -0800
Ian Wilson wrote:
You must be aware that Eclipse has a wizard for creating Jars. I find it
a lot less complex than your method of encoding image data within
class files seems.
Create a jar every edit-test-debug cycle? That adds up when you are
rapidly tweaking and adjusting something. As opposed to something you
can just "set and forget".
I use Eclipse, I have an image for my app in a subdirectory of my
project. I have this code (and this code only) to load the image:
setIconImage(new ImageIcon(MainForm.class
.getResource("/resources/logo32.png")).getImage());
When I run the app from Eclipse it finds the image from the subdirectory
in the filesystem.
After getting Eclipse to make a jar that includes the image, running the
jar causes the image to be loaded from the jar instead. No change to the
above code.
Hrm. Where is this subdirectory?
Maybe I'm missing something, but it looks like you've spent more time
thinking up arguments why you shouldn't try the suggestions offered than
you would have spent simply trying them.
You may be missing the fact that I got it working several postings ago?
And in fact before the first reply arrived, once I managed to happen on
a Web page suggesting the method that I used. That page, by the way,
being somewhere in Sun's huge sprawling Java site.
Now, for doing something suggested on Sun's own Web site, I find myself
being harangued and forced to keep posting stuff in my own defense
instead of getting on with my work, in a thread that should be dead now.
.
- Follow-Ups:
- Re: Giving an application a window icon in a sensible way
- From: Daniel Dyer
- Re: Giving an application a window icon in a sensible way
- From: Joe Attardi
- Re: Giving an application a window icon in a sensible way
- References:
- Giving an application a window icon in a sensible way
- From: Twisted
- Re: Giving an application a window icon in a sensible way
- From: Mark Rafn
- Re: Giving an application a window icon in a sensible way
- From: Twisted
- Re: Giving an application a window icon in a sensible way
- From: Mark Rafn
- Re: Giving an application a window icon in a sensible way
- From: Twisted
- Re: Giving an application a window icon in a sensible way
- From: Daniel Pitts
- Re: Giving an application a window icon in a sensible way
- From: Twisted
- Re: Giving an application a window icon in a sensible way
- From: Ian Wilson
- Giving an application a window icon in a sensible way
- Prev by Date: Re: Giving an application a window icon in a sensible way
- Next by Date: Simplest way to develop web applications in Java?
- Previous by thread: Re: Giving an application a window icon in a sensible way
- Next by thread: Re: Giving an application a window icon in a sensible way
- Index(es):
Relevant Pages
|