Article View: borland.public.jbuilder.java.swing
Article #11091JButton images
From: David
Date: Thu, 15 Jul 1999 00:00
Date: Thu, 15 Jul 1999 00:00
20 lines
1087 bytes
1087 bytes
Good day -
I am evaluating JBuilder 3 Enterprise and have a simple question: How
do I add an image to a JButton?
I have dropped a JButton on the JToolBar, added the following code so it
is an attribute:
firstImage = new
ImageIcon(Org_Client.OrgClientFrame.class.getResource("first.gif"));
Then I assigned it in the property editor for the JButton. But it gives
a NullPointerException. What am I doing wrong?
By the way, does anyone know where I can get some good (free) button
images to download for my application?
Thanks in advance for your help.
David
Technical Details
Message-ID:
<378DFCD3.ED37EB88@lmco.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,accff0b1708abe67,start X-Google-Attributes: gid111d45,public From: David <david.v.clark@lmco.com> Subject: JButton images Date: 1999/07/15 Message-ID: <378DFCD3.ED37EB88@lmco.com> X-Deja-AN: 501359389 Content-Transfer-Encoding: 7bit Organization: Another Netscape Collabra Server User X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing