coder
coder

Reputation: 843

How to make a rotated panel in java

I want to know if there is some way to rotate a panel without changing its shape. I mean I am able to rotate the drawings inside the panel using rotate() given in graphics2D but the rectangular drawings become diamond shaped. Is there some soln for it?? I mean can I avoid the drawing from becoming diamond shape. The problem is more evident when u change the resolution of the screen.

Upvotes: 2

Views: 2521

Answers (1)

trashgod
trashgod

Reputation: 205785

Yes, rotate the image around its center, as shown in this example.

Upvotes: 1

Related Questions