View Full Version : Java and my moving star
In my JFrame, I already draw a 2d star, i would like to make it move around in my frame, but i don't know how to erase the old star when it appears in a new position, can anyone here help me with this ?
Thanks
Although I haven't done much Java programming recently, I think one of the following suggestions could be used.
1. Before updating the position of the star, you could first paint it the background color.
2. Alternatively, you could implement "double buffering".
Ah.., I see it now, thanks for your suggestions ..lol..
(!ThumbsUp!)
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.