import java.util.*; import java.awt.*; import java.awt.geom.*; import javax.swing.*; public class Clock01 { 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(); for(int i = 0; i < 12; i++){ af.setToRotation(Math.PI / 6 * i, 200, 200); g2.setTransform(af); g2.fillOval(198, 0, 4, 20); } } }; public Clock01(){ 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 Clock01(); } }