Article View: borland.public.jbuilder.java.swing
Article #10213Problem with url
From: Michel P�rez
Date: Wed, 27 Oct 1999 00:00
Date: Wed, 27 Oct 1999 00:00
25 lines
1081 bytes
1081 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:
<7v7nl1$j4r12@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,8358c00ef4759950,start X-Google-Attributes: gid111d45,public From: "Michel P�rez" <mperez@eurobanco.com> Subject: Problem with url Date: 1999/10/27 Message-ID: <7v7nl1$j4r12@forums.borland.com> X-Deja-AN: 541351927 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