Original Post
in a case like the one i show below how do you use a repaint or paintimeddailty method?? theframe is a JFrame and ive tried with a canvas too.
public static void UpdateBall()
{
boolean DO = false;
while(!DO)
{
for(int x = 0; x < 1; x = x)
Bx += Bxv;
By += Byv;
ballArea = new Rectangle(Bx, By, 5 + Bx, 5 + By);
theframe.repaint(ballArea);
g.setColor(Color.pink);
g.drawOval(Bx, By, 5, 5);
ballArea = new Rectangle(Bx, By, 5, 5);