Re: Giving an application a window icon in a sensible way
Twisted wrote:
Patricia Shanahan wrote:
What's the advantage of this approach compared to using getResource?
It's built right into the frame subclass file it applies to?
Why would it? It's built into the classloader that
many different classes use to get paths to resources.
It doesn't need to be put in some jar file, then retrieved,
Why? Where were you intending to put it.. the cookie jar?
...then all
kinds of recovery code written to deal with the IOExceptions that can
result if Something Goes Wrong(tm)?
Oh, of course, if nothing could conceivably go wrong
with your own home rolled method* - don't bother with
all this getResource crap.
* Such as the image showing 'all white'.
No need to fiddle with classpath?
Nope. You just need to specify it correctly for the application
(once).
Everything is self-contained in the source files?
Now you're ust being silly. Are you intending to put
- properties files
- help text
- localization data
- any of many other resources..
...'stitched in' to the code?
Therein lies the path to madness, but (checks sig.)
'Twisted'.. I see your on your way there, so...
Go for it! ;-)
Andrew T.