๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17385

Re: Gifs in JLabel not shown...

#17385
From: Ross M. Dukeshier
Date: Mon, 16 Nov 1998 00:00
48 lines
2678 bytes
St๏ฟฝphane Bonnet wrote:
> 
> .. when starting the application from MSDos Prompt
> 
> hi,
> 
> what a surprise !!!! for the first time today i tried to start from the
> DOS windows one Java Application, already compiled under JBuilder.
> 
> And then... all my icons, displayed within JLabels are not visible. No
> exception is raised, we just can't see them. Anyone has any kind of idea
> of same experience ? I'm using JDK1.1.6
> 
> Of course, when i start the application with JBuilder, no problem,
> everything is perfect... But i need to start from DOS...
> 
> Thank you very much for your help...
> 
> Stephane.
> 
> _______________________________________________________
> Stephane Bonnet
> _______________________________________________________
> Address -> Mikontalo C 155, 33720 TAMPERE, FINLAND
> Mobile  -> (+358)(0)40 7270601
> E-mail  -> steph@cs.tut.fi, bonnet@tre.ntc.nokia.com
> Web     -> http://www.cs.tut.fi/~steph
> _______________________________________________________
A little insight, I hope.  My group had this problem about 2 weeks ago. 
What we figured out was that JBuilder's project looks in the project
directory for the images (if you are using a relative path).  When you
run it for real, however, Java, as at least I would expect it to, looks
in your classes location.  Putting the images location in your classpath
is one solution, but if/when you deploy it, you will probably want them
with your classes rather than having to set up special directory
structures so they'll be found.

Since we kinda wanted to see the GIFs in the designer as well as when we
ran them, we set our source and classes locations for the project to the
same directory and may also have set the convention that the project
would include only java files for the package it was named for (i.e. one
project = one package).  That way, the package and the classes location
are the same so JBuilder and Java will both speak the same language, so
to speak.  I suppose you could set the source to a different location...

Hope it helps...

Ross Dukeshier
Technical Details
Message-ID: <3650CAC7.163C@flash.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3650222F.A1AB2D6C@tre.ntc.nokia.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,2c004dbb716ec9eb
X-Google-Attributes: gidf74b3,public
From: "Ross M. Dukeshier" <dukeman@flash.net>
Subject: Re: Gifs in JLabel not shown...
Date: 1998/11/16
Message-ID: <3650CAC7.163C@flash.net>
X-Deja-AN: 412610040
Content-Transfer-Encoding: 8bit
References: <3650222F.A1AB2D6C@tre.ntc.nokia.com>
Content-Type: text/plain; charset=iso-8859-1
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Reply-To: dukeman@pop.flash.net
Newsgroups: borland.public.jbuilder.java.language