Re: Giving an application a window icon in a sensible way



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.

.



Relevant Pages

  • Re: [ot] Santa, I want one please!
    ... >> JaR ... >> Droolin' Thug ... The web site says they are affordable, ...
    (microsoft.public.cert.exam.mcse)
  • Re: Obtain NOTHING !!!
    ... YOU ARE THE SLUDGE ON THE BOTTOM OF A NEGLECTED SEPTIC ... JaR, you have *some* imagination! ... In the mean time, here's a perfect quote you can add to the web site, ...
    (microsoft.public.cert.exam.mcse)
  • Re: Jar signing is just not wotking
    ... load my jar and deploy it using jnlp file .. ... Does the JNLP file request extended permissions? ... web site is incorrect (they didn't add the DTD directive to their XML ...
    (comp.lang.java.programmer)
  • Re: I just moved my desk
    ... it's posted on the web site. ... That's my story and I'm sticking to it. ... JaR ... Firm Thug ...
    (microsoft.public.cert.exam.mcse)
  • Re: And then...????????
    ... > I haven't seen a TIP jar ... please tell me that in capitalizing "tip" you are not suggesting ... I limit that term to the chain operations. ... but I wouldn't describe it as a fast food ...
    (alt.usage.english)