You can do this:
 
   ImageIcon imageIcon = new ImageIcon(new URL(getCodeBase(),"cluster.gif"));
 
if the image is in a package ...

   ImageIcon imageIcon = new ImageIcon(new URL(getCodeBase(),"package/cluster.gif"));
 
I hope this can help. :-)
 
 
-------------------------------------------------------------
                 Jose Luis Rando Calvo
       Area de Investigaci�n y Desarrollo
       Estudio Inform�tica Software S.L.U.
             � � ----==== Grupo EI ====---- � �
-------------------------------------------------------------

>>> Ravi Prakash <[EMAIL PROTECTED]> 05/02 8:16  >>>
Hi,

I am using applet and the classes are put in a jar file.  In the jar
file there are gif files.
I have to display in the applet.

i am using follwing syntax

ImageIcon imageIcon = getImageIcon("cluster.gif");
if (imageIcon != null) clusterImageJLabel.setIcon(imageIcon);

I am not getting the image to be displayed in the applet.

any suggestion please...
raviprakash

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to