A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java Micro Edition
j2me repaint() quetion
Joined: May 17, 2004
Aug 18, 2006 01:16:00
i have a j2me repaint() quetion. I apprecaite if you can help me with that.
In my code, I call
repaint(x1, y1, w1, h1);
repaint(x2, y2, w2, h2);
repaint(x3, y3, w3, h3);
repaint(x4, y4, w4, h4); // note: x1 , x2, x3, x4 are all different values.
even though repaint() is call a-sync, I should still see paint() get called 4 times, right?
From my debugging, I see the no of paint() is less than the no of called i made to repaint().
Do you have any idea why is that?
Joined: Feb 19, 2005
Aug 25, 2006 16:48:00
Yes, paint() is not necessarily called the number of times you call repaint(). Multiple repaint() requests may be merged into just one call to paint().
To ensure synchronized painting you can either use:
2) use GameCanvas which does everything Canvas does and provides the flushGraphics() call
Get ready for your
See what all the buzz is about ...
I agree. Here's the link:
subject: j2me repaint() quetion
Recursion SnowFlake ?
Problem with java layout and panels and containers
Corba specification or vendor implementation behavior?
This is Homework Just need a hint:?????
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014