The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

This topic is READ ONLY
import-bot (20211) [Avatar] Offline
#1
[Originally posted by manis]

Hi Team,

I would like some pointers/examples for packaging JApplet along with
graphical resources like icons for buttons etc. I want to embark on
"iconizing" a successful applet and want to do it with the least foul-up.
How do I "jar" an applet along with the associated resources ..at the
same time maintaining the icon-button links.?.
Thanks for your attention...Mani.
import-bot (20211) [Avatar] Offline
#2
Re: Packaging JApplet along with resources like ICONS etc
[Originally posted by matt]

See the Java tutorial for info about JAR file creation...
There is too much to explain to justify doing it here..

However, one thing to note is that when pointing to images,
you should use the following syntax to force the image to
be loaded from the jar (so you can bundle your images within
the jar):

ImageIcon myImage = new
ImageIcon(getClass().getResource("your_image_filename.gif"));