I am working on a swing program to display multiple images. And you can rotate the image (each implemented as JComponent).
The problem is that when the image is rotated, the border JComponentdoes not change, so the image is cropped.
Is there a way to also rotate the frame so that the image can be completely drawn?
(I know that it is possible to calculate a new border size, but it leaves an empty space on the edge. When the rotated image is superimposed on the other and one wants to move it below it, it is impossible to do this because the event will be transmitted to the image above, to the transparent edge so itβs more ideal if you can just rotate the frame).
source
share