I'm experiencing a problem with AWT in rotating the graphics in a panel by 90 degrees. I can rotate the graphics in a panel by casting to Graphics2D and applying a transform. The problem with this is that if the panel area is rectangular then part of the graphics becomes hidden. I can't seem to set clip bounds to the whole area. If, for example, the window is short and wide then the clip region becomes narrow and tall. If the window is narrow and tall the clip region becomes short and wide. I don't know how to override this behavior.
Is there a better way of doing this or a way to work around the problem?
EDIT SOLVED:- It turns out that overriding behavior of getWidth() and getHeight() is a bad idea lol