import java.util.*; import java.awt.*; import java.awt.geom.*; import javax.swing.*; public class Affine01 { private JFrame frame = new JFrame("•`‰æ"); private JPanel pane = (JPanel)frame.getContentPane(); private Canvas canvas = new Canvas(){ @Override public void paint(Graphics g){ Graphics2D g2 = (Graphics2D)g; AffineTransform af = new AffineTransform(); af.setToRotation(Math.PI / 3, 200, 200); g2.setTransform(af); g2.setColor(Color.BLUE); g2.fillOval(190, 20, 20, 380); } }; public Affine01(){ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); canvas.setBackground(Color.LIGHT_GRAY); canvas.setSize(400, 400); pane.add(canvas); frame.pack(); frame.setVisible(true); } public static void main(String[] args) { new Affine01(); } }