I am creating a "Super Pang" style game and I need the sphere to bounce randomly on the parabola-shaped map. this is what i wear.
public int speed=10;
public void move(){
if(this.getX()<=0){
this.setLocation(this.getX()+3,this.getY()+speed);
}
this.setLocation(this.getX()+3,this.getY()-speed);
}