This seems like an easy task, but I've literally searched for hours and haven't found anything so far. I have an ImageIcon which I would like to rotate by a certain angle.
What would be the simplest way to do this?
Edit: I tried converting the ImageIcon to a BufferedImage, and rotating the Graphics2`bPlayerImage = new BufferedImage( playerSize, playerSize, BufferedImage.TYPE_INT_RGB);
Graphics2D g = (Graphics2D)bPlayerImage.getGraphics();
g.rotate(Math.toRadians(turnAngle));
g.drawImage(playerImage, x, y, null);`
The image doesn't appear to rotate.