Well, Im gonna do all the work for you... NOT!
try
http://www.Java-Tutorial.net
they show how to move a ball. An important formula might be the one to calculate the distance between
the ball and a brick:
float quad(float f) {return f*f}
float Distance(Ball, Brick)
{
float dx = ball.x - Brick.x;
float dy = ball.y - Brick.y;
float dist = Math.sqrt(quad(dx) +quad(dy) );
return dist;
}
Now f**kin do it yourself!!!