Article View: borland.public.jbuilder.java.swing
Article #10142Re: ImageIcon Error
From: Mark Sellers
Date: Wed, 10 Nov 1999 00:00
Date: Wed, 10 Nov 1999 00:00
71 lines
3110 bytes
3110 bytes
They're in my JAR file, and I've tried various ways of getting them back out
of the JAR file, including:
URL imageUrl = ClassLoader.getSystemResource("ChurchHealth/openFile.gif");
ImageIcon image1 = new ImageIcon(imageUrl);
Can't figure out why i can't get them out of the JAR file!?!
Mark
Rich Wilkman <rwilkman@inprise.com> wrote in message
news:3829E2E8.FE13B6DB@inprise.com...
> Mark:
>
> It's dying in the constucter (<init>) because it can't find the image to
> use. Did you deploy the images with the rest of your code? It would be
> the com.borland.jbcl.control.images or the com.borland.dbswing.images
> packages.
>
> -Rich
>
> Mark Sellers wrote:
> >
> > Using JBuilder3 EE, have a simple JFrame with the standard,
JBuilder-added
> > code for JToolbar and buttons with images. When I try and deploy and
run
> > this app, I get the following:
> >
> > Exception in thread "main" java.lang.ExceptionInInitializerError:
> > java.lang.NullPointerException
> > at javax.swing.ImageIcon.<init>(ImageIcon.java:106)
> > at
> >
com.borland.dbswing.DBTextDataBinder$UndoAction.<init>(DBTextDataBinder.java
> > :1247)
> > at
> > com.borland.dbswing.DBTextDataBinder.<clinit>(DBTextDataBinder.java:158)
> > at
> > com.borland.dbswing.JdbTextField.commonInit(JdbTextField.java:132)
> > at
com.borland.dbswing.JdbTextField.<init>(JdbTextField.java:119)
> > at
com.borland.dbswing.JdbTextField.<init>(JdbTextField.java:102)
> > at ChurchHealth.Frame1.<init>(Frame1.java:63)
> > at ChurchHealth.Application1.<init>(Application1.java:10)
> > at ChurchHealth.Application1.main(Application1.java:28)
> >
> > I've tried different ways of initializing the ImageIcon images used for
the
> > toolbar button's images, but it still doesn't work.
> >
> > Any clues? Help?
> >
> > Thanks in advance,
> > Mark Sellers
> > The Christian and Missionary Alliance
> > http://www.cmalliance.org
>
> --
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Rich Wilkman
> Quality Assurance Manager
> Borland JBuilder Team
>
> If you see something that looks like an opinion up there,
> it's mine and mine alone.
>
> Mail sent to me from the newsgroups won't bounce but will
> be ignored. If I have time, I'll respond, but you have
> a better chance if you confine your posts to the newsgroups
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<80cqc3$k365@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<80cllp$h1116@forums.borland.com> <3829E2E8.FE13B6DB@inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,13473e1d22ea6f27 X-Google-Attributes: gid111d45,public From: "Mark Sellers" <sellersm@cmalliance.org> Subject: Re: ImageIcon Error Date: 1999/11/10 Message-ID: <80cqc3$k365@forums.borland.com> X-Deja-AN: 547079227 References: <80cllp$h1116@forums.borland.com> <3829E2E8.FE13B6DB@inprise.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Organization: The Christian and Missionary Alliance X-MSMail-Priority: Normal Reply-To: "Mark Sellers" <sellersm@cmalliance.org> Newsgroups: borland.public.jbuilder.java.swing