I would to rotate JXImagePanel. It should be possible - this is about JXImagePanel
:
While JLabel
and JButton
allow you to easily add images to your Swing applications,
the JXImagePanel
makes it trivially easy to add any BufferedImage
or Icon
to your Swing applications.
If editable, it also provides a way for the user to change the image. In addition, the JXImagePanel
provides many built in effects out-of-the-box,
including Tiling
, Scaling
, Rotating
, Compositing
, and more.
However, I cannot figure out how to do this. Currently my code snippet is:
bufferedImage = ImageIO.read(new File("image.png"));
image = new ImageIcon(bufferedImage).getImage();
tempImage = image.getScaledInstance(100, 150, Image.SCALE_FAST);
this.deskJXImagePanel.setImage(tempImage);
Now I would like to rotate it in 0-360
degrees. How it can be done?