🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Jbuilder ImageControl - Help - newbie question!!!

#16686
From: Kirk True
Date: Thu, 21 Jan 1999 00:00
50 lines
2161 bytes
Hi Jean-Paul,

You could try something like this...

    private void setImage(Image i) {
        try {
            imageControl1.setImage(i);
            imageControl1.repaint();
        } catch (IOException e) {
            System.err.println(e);
        }
    }

...and/or...

    private void setImage(String filename) {
        try {
            Image i = getToolkit().getImage(filename);
            imageControl1.setImage(i);
            imageControl1.repaint();
        } catch (IOException e) {
            System.err.println(e);
        }
    }

in the window that contains the ImageControl.

Jean-Paul Lanaux wrote:
> 
> I am a java newbie.
> 
> The program I want to write calls a dialog box and has a image (gif)
> displayed which is all working fine.
> 
> I want several different images to be displayed (one at a time) when
> certain events take place. I want these images to replace whatever image is
> being displayed in this dialog box.
> 
> I have been reading java books, which don't discuss Jbuilder classes and
> methods (which I'd perfer to use). The Jbuilder Help, just doesn't give me
> enough help to write the method.
> 
> Can some one give a little help?? Please??

I hope this is what you're looking for,
Kirk
_____________

QA Engineer, Java Products Group
Inprise Corporation  -  http://www.inprise.com
Technical Details
Message-ID: <36A79CC5.A7B509@inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01be456b$f4353ee0$84c916d0@jplanaux.winkinc.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5619,ce19e59a91246619
X-Google-Attributes: gidf5619,public
X-Google-Thread: f74b3,ce19e59a91246619
X-Google-Attributes: gidf74b3,public
X-Google-Thread: 10cf9d,ce19e59a91246619
X-Google-Attributes: gid10cf9d,public
From: Kirk True <ktrue@inprise.com>
Subject: Re: Jbuilder ImageControl - Help - newbie question!!!
Date: 1999/01/21
Message-ID: <36A79CC5.A7B509@inprise.com>
X-Deja-AN: 435373343
Content-Transfer-Encoding: 7bit
References: <01be456b$f4353ee0$84c916d0@jplanaux.winkinc.com>
Content-Type: text/plain; charset=us-ascii
Organization: Inprise Corporation
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language,borland.public.jbuilder.jbcl,borland.public.jbuilder.non-technical