Article View: borland.public.jbuilder.java.swing
Article #10250Problem with URL
From: Michel P�rez
Date: Wed, 03 Nov 1999 00:00
Date: Wed, 03 Nov 1999 00:00
25 lines
1080 bytes
1080 bytes
hi,
I'm having a problem fetching an image from a file, using his URL for
accessing it. My icon files are kept in c:\aplicacion\images, so I tried
the
following piece of code:
try {
URL myUrl = new URL(file:///c:/aplicacion/images);
}
catch (MalformedURLException e) {
...
}
and then
ImagSol = new ImageIcon(url,"sol.gif");
that's when I'm having the exception:
uncaught error fetching image: java.lang.NullPointerException
at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:106)
Can anyone help me?
thanks a lot,
Mairobi
Technical Details
Message-ID:
<7vpenn$c374@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,9007e0e25ba0667d,start X-Google-Attributes: gid111d45,public From: "Michel P�rez" <mperez@eurobanco.com> Subject: Problem with URL Date: 1999/11/03 Message-ID: <7vpenn$c374@forums.borland.com> X-Deja-AN: 543947903 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing