🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: createImage() for component

#2505
From: Joi Ellis [TeamB]
Date: Sun, 19 Nov 2000 00:00
24 lines
1418 bytes
kylui <kylui@pcgsys.com> wrote:
> Hello

> i created a component called "view". the program will have some drawing on
> it.
> it can display the drawing correctly. now i want to get the image object
> from this component using createImage() and display it into a panel
> but only a gray box is display in the panel.
> here is the code

> g.drawImage(view.createImage(view.getBounds().width,view.getBounds().height)
> , 200, 200, this);

> please help, is there any other way to do it?

You need to post for us a much larger snippet than this.  Is this an AWT
app, or a Swing app?   Are you packing the frame before asking for its size?
There isn't nearly enough informaton here for anyone to do more than throw out
wild guesses.  At least, not enough for me...

-- 
Joi Ellis (TeamB) 
No direct email, please.
For best results, post on news server newsgroups.borland.com!
Technical Details
Message-ID: <8v9lie$6fg9@bornews.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8v4vdj$hgq2@bornews.inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,b33f6e26f1379fad
X-Google-Attributes: gid1089d0,public
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Subject: Re: createImage() for component
Date: 2000/11/19
Message-ID: <8v9lie$6fg9@bornews.inprise.com>
X-Deja-AN: 695551672
References: <8v4vdj$hgq2@bornews.inprise.com>
Organization: Another Netscape Collabra Server User
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.14-5.0 (i686))
Newsgroups: borland.public.jbuilder.java.api