Never it is mentionned in any Java API that repaint() clears the screen or any rendering surface attached to a Graphics object. It will simply trigger a call to paint() with a Graphics object being clipped to cover at least that area.
The best thing to do is to paint a uniform background first then paint other sutff, and not paint anything that's not supposed to show.
repaint() method also do the same as paint() method. For drawing moving objects is the best make "buffer", image which has the same width and height as display. Than use a getGraphics() to get a graphics interface to draw on background. It can be used to graw images, texts, rects or lines in (for example) drawBg() method. This method You can call only in cause of changing background. In paint() method simply draw "buffer" image and on this image draw cursor ( or any else stuff which will move). I hope this is undestandable, my english is not up too much ;o)