This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Problem in refresh the display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Problem in refresh the display" Watch "Problem in refresh the display" New topic

Problem in refresh the display

Kate Winslate

Joined: Jun 25, 2005
Posts: 3

i have got problem in refresh the display. i have done a program that slide the image using arrow keys. i also used the repaint() method for refresh the diplay but the priveously displayed images are as it is?

what should i do to clear the priveously displayed images?
is there any "clearscreen" function in j2me?

thanks in advance...
Svend Rost
Ranch Hand

Joined: Oct 23, 2002
Posts: 904
Hi Kate, welcome to the Javaranch.

You can try to "clear" the current canvas (i.e. the screen) before you
draw something. This can be done with the following:

void paint(Graphics g)
- set the color to for instance white or black
- draw a rectangle, that fills the whole canvas

Then the screen has been cleared, and you can draw the image.

/Svend Rost
I agree. Here's the link:
subject: Problem in refresh the display
It's not a secret anymore!