Posted By:
Peetey_Labanc
Posted On:
Wednesday, January 23, 2002 06:17 AM
Please help! How can I use packages with images? I want to add to a package a dialog with its icon (GIF image) and I don't know, how to read this image. I have this image in subdirectory images and I try this: ImageIcon imic = new ImageIcon("images/image.gif"); If I have this package in application directory, than it works. But if I place it on other place to CLASSPATH, my dialog have lost this icon. Next try: ImageIcon imic = new ImageIcon("packagename/images/image.gif"); Nothing happened - icon still lost. If anybody know the answer, please help me - send reason to: peetey@pob
More>>
Please help!
How can I use packages with images? I want to add to a package a dialog with its icon (GIF image) and I don't know, how to read this image.
I have this image in subdirectory
images
and I try this:
ImageIcon imic = new ImageIcon("images/image.gif");
If I have this package in application directory, than it works. But if I place it on other place to CLASSPATH, my dialog have lost this icon. Next try:
ImageIcon imic = new ImageIcon("packagename/images/image.gif");
Nothing happened - icon still lost.
If anybody know the answer, please help me - send reason to:
peetey@pobox.sk
.
Thanks.
<<Less