Ok I got it now and it works perfectly except for one thing. The whole canvas rotates, I don�t want that I only want to rotate the image on the canvas, I therefore made JPanel of same size as the image and made it into a drawing canvas and added upon the old canvas. The other images which are now not part of the same canvas are not affected by the rotation but because the rotation canvas obscures the other one, there is always a solid square that turns regardless of the shape of the image.
Let me give an example to explain, lets say I wanted to make a windmill, the blades should rotate but not the mill itself however
you should be able to see the mill between the blades as they turn. In my example the rotationCanvas obscures the non-rotating canvas instead of only the windmill blades.
I hope you understand what I mean, I�ll include my code: