if some one is having same problem as i do, here is a solution. i am not sure if this is the best way but it seem to be working for me. hope it helps.
if(this.getBoundsBall().intersects(this.getBoundsRect()))
{
if(ballY+ballHeight >= rectY && ballY <= rectY)
{
System.out.println("collision from top");
}
if(ballY <= rectY+rectHeight && ballY+ballHeight >= rectY+rHeight)
{
System.out.println("collision from bottom");
}
if(ballX+ballWidth >= rectX && ballX <= rectX)
{
System.out.println("collision from left");
}
if(ballX <= rectX+rectWidth && ballX+ballWidth >= rectX+rectWidth)
{
System.out.println("collision from right");
}
}