How do I rotate an image in Java 90 degrees while using the paint Method in JSwing? Here is my code so far, it is not working... transform = transform = new AffineTransform();...

How do I rotate an image in Java 90 degrees while using the paint Method in JSwing? Here is my code so far, it is not working... transform = transform = new AffineTransform(); transform.rotate(Math.toRadians(45)); //transform.setToScale(.05, .05); File sourceimage = new File("PacMan.png"); try { image = ImageIO.read(sourceimage); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } //ImageIcon icon = new ImageIcon(image); transform.rotate(Math.toRadians(90)); g2.drawImage(image, transform, null

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here