• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in refresh the display

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

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...
 
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic