🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #318

Re: Problems with loading & displaying a picture

#318
From: Andreas Koch
Date: Mon, 02 Feb 2004 19:00
28 lines
1992 bytes
Thanks for your answers!

Unfortunately i can't compile the method using Classloader.
Seems JPanel has no getClassLoader, and drawImage(I,int,int,
int,int,<null type>) doesn't take ImageIcons.


The second method compiles, and finaly works after i specify the full, 
absolute path and filename of the picture (as does my original version
modified to the full path)

Doesn't work:
        white_marble = toolkit.getImage("0196.jpg");

Works:
        white_marble = 
toolkit.getImage("c:/projects/test2/classes/test2/0196.jpg");

The images are in my src\test2 folder, and get copied to classes\test2 
on compilation.

What relative path would i have to use to get the images (so it
works on other systems and inside a .jar) ?

                         thanks a lot,
-- 
                                   Andreas
He screamed: THIS IS SIG!
Technical Details
Message-ID: <401e9d7b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <401d06eb$1@newsgroups.borland.com> <pan.2004.02.02.08.34.02.603265@yahoo.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,cc9d3c5ba1462852
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2004-02-02 11:10:26 PST
Date: Mon, 02 Feb 2004 20:00:15 +0100
From: Andreas Koch <nospam@kochandreas.com>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040113
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: Problems with loading & displaying a picture
References: <401d06eb$1@newsgroups.borland.com> <pan.2004.02.02.08.34.02.603265@yahoo.de>
In-Reply-To: <pan.2004.02.02.08.34.02.603265@yahoo.de>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 217.255.119.62
Message-ID: <401e9d7b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1075748219 217.255.119.62 (2 Feb 2004 10:56:59 -0800)
Lines: 28
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail