Sorry, forgot the buttons... ignore the other one...
I am posting my most recent one next...
I am posting my most recent one next...
private class MyPanel extends JPanel { ImageIcon image = new ImageIcon("Sample.jpg"); int width = image.getIconWidth(); int height = image.getIconHeight(); long angle = 30; public MyPanel(){ super(); } public void paintComponent(Graphics g){ super.paintComponent(g); Graphics2D g2d = (Graphics2D)g; g2d.rotate (Math.toRadians(angle), 60+width/2, 60+height/2); g2d.drawImage(image.getImage(), 60, 60, this); g2d.dispose(); } }//end
Comment