hi, I am wanting to rotate an image 90 degrees when you press a button. However so far i can only get it to rotate once, and then it stops. I've tried rotating the image on its own and using the label to rotate it
Here is my code
BufferedImage rotatedImg = new BufferedImage(editlabel.getWidth(), editlabel.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = (Graphics2D)rotatedImg.getGraphics();
g2.rotate(Math.toRadians(90), editlabel.getWidth()/2, editlabel.getHeight()/2);
g2.drawImage(image, 0, 0, editlabel.getWidth(), editlabel.getHeight(), null);
editlabel.setIcon(new ImageIcon(rotatedImg));
Any help, in where i am going wrong will be greatly appreciated
Cheers