🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9029

Buttons icons in WinNT and Solaris

#9029
From: Rita Barda
Date: Mon, 05 Jun 2000 00:00
80 lines
3359 bytes
This is a multi-part message in MIME format.
--------------49F5C32BEF2EEB062243B0AE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I have a little problem with project in WinNT and Solaris.
The problem is with icons of buttons.

At first, I created a project in WinNT, and added icons to buttons
(added GIF files to the project and selected a needed file in the "icon"
property) .
The source line of the setting icon was like this:
    btnExit.setIcon(new
ImageIcon(RioGuiFrame.class.getResource("door01.gif")));

Then, I copied the project to Solaris. And I could not nor view the
icons on the buttons in the designer window, neither run the
application.
There were two following messages for each icon in the messages window:
    java.lang.NullPointerException new
ImageIcon((RioGuiFrame.class.getResource("door01.gif"))
    Failed to create live value from new
ImageIcon((RioGuiFrame.class.getResource("door01.gif"))

I tried to set icon property to "none", remove a GIF file from the
project, then add it and select it in the icon property.
And the code line (that was added by JBuilder)
was the same, with "getResource" method.
And, of course, the problem was still there.

So, I created a new project with new java files, and designed all frames

from the beginning.
Now, when I added icons to buttons, the source line was as following:
    btnExit.setIcon(new ImageIcon(new
java.net.URL("file:////home/rita/Projects/RioControl/images/door01.gif")));

And everyting was fine.

I opened this project in WinNT, and here is the problem again:
Windows don't know the path "//home/rita", so I couldn't see any icon on

the buttons.
When I added an icon anew, the source line was changed:
    btnExit.setIcon(new ImageIcon(new
java.net.URL("file:///H:/rita/Projects/RioControl/images/door01.gif")));

(H: is the mapping drive of the Unix network).

And here are my questions:
1. What is the solution of this problem?
2. Are there additional problems with JBuilder in NT and Solaris?
Are there something that I should know to be able to edit and run
the same project without problems in NT and Solaris?

Any help will be appreciated,
Rita Barda.


--------------49F5C32BEF2EEB062243B0AE
Content-Type: text/x-vcard; charset=us-ascii;
 name="rita.barda.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Rita Barda
Content-Disposition: attachment;
 filename="rita.barda.vcf"

begin:vcard 
n:;
tel;fax:972-9-9573732
tel;work:972-9-9524025
x-mozilla-html:FALSE
org:Conexant Systems Israel (1996) LTD.;NAD
version:2.1
email;internet:rita.barda@conexant.com
adr;quoted-printable:;;11 Galgaley Haplada Street=0D=0AP.O.B. 12660;Herzlia;;46733;Israel
fn:Rita Barda
end:vcard

--------------49F5C32BEF2EEB062243B0AE--
Technical Details
Message-ID: <393B63F5.CDDAAD49@conexant.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,db85f3cc35399006,start
X-Google-Attributes: gid111d45,public
From: Rita Barda <rita.barda@conexant.com>
Subject: Buttons icons in WinNT and Solaris
Date: 2000/06/05
Message-ID: <393B63F5.CDDAAD49@conexant.com>
X-Deja-AN: 631177947
X-Accept-Language: en
Content-Type: multipart/mixed; boundary="------------49F5C32BEF2EEB062243B0AE"
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing