(keitai-l) Re: "Image drawing not in paint method"

From: Kapil Sharma <kapes.endless_at_gmail.com>
Date: 06/17/05
Message-ID: <e4569d7f05061702416efb3c87@mail.gmail.com>
Thanks 

But This will not solve my purpose as I must have to call the repaint
method to draw the new image and that according to my understanding
invokes the underlying JVM and thus bit slower...

BTW I have done this using ImageLabel class. I have use setimage
property of this class and that solves the whole thing.

Any other idea can smash the costly time..

Thanks

Kapil Sharma

On 6/17/05, Claus Hoefele <claus.hoefele@gmail.com> wrote:
> If you need an offscreen image, have a look at
> com.nttdocomo.ui.Image.createImage(). Use image.getGraphics() to draw
> on your image. To display the image on the screen, use
> grapics.drawImage() in your paint() method. paint() is only called
> when needed or when you call repaint(). You can avoid drawing your
> image unnecessarily by avoiding too many repaint() calls, but you have
> to call repaint() at least once when the image changed.
> 
> Alternatively, you can have a look whether
> com.nttdocomo.ui.VisualPresenter can do the job. It is a high-level UI
> object that handles drawing images without the need for additional
> code.
>
Received on Fri Jun 17 12:41:27 2005