Math.atan2 should do the job
I'm lazy, and my reply suggests it aswell. I'm going to give you more than just that little hint: The source code I used to calculate the velocities of a projectile shot form the player.
Shot shot = new Shot(player.getX(), player.getY(),
* GameMain.shotSpeed + player.getXVelocity());
* GameMain.shotSpeed + player.getYVelocity());
It should be pretty selfexplainatory. The angle was entered in radians, and is normally in degress for my convinience.