4class MyDrawPanel2
extends JPanel {
5 public void paintComponent(Graphics g) {
6 int red = (int) (Math.random() * 256);
7 int green = (int) (Math.random() * 256);
8 int blue = (int) (Math.random() * 256);
9 g.setColor(
new Color(red, green, blue));
10 g.fillOval(70, 70, 100, 100);