repaint() method problem

Hi. Im trying to draw a image on a Jframe, and I invoke this using the repaint() method. In other method named paintComponent I create the image using a graphics object.

But when the repaint() method start, the screen erase everything that it have inside instead of drawing the figure.

Any ideas?

Kind regards.

[336 byte] By [karma1234a] at [2007-11-27 4:50:28]
# 1
You are doing something wrong. Post a small example program demonstrating your problem.
Hippolytea at 2007-7-12 10:03:49 > top of Java-index,Java Essentials,New To Java...
# 2
call super.paintComponent(); in the overriden paintComponent() method before your custom painting on the Component
shittybytesa at 2007-7-12 10:03:49 > top of Java-index,Java Essentials,New To Java...