import java.applet.*; import javax.swing.*; import java.awt.*; public class Circles extends JApplet { public void paint(Graphics g) { g.setColor(new Color(0,0,80)); g.fillRect(0,0, 500, 500); g.setColor(new Color(255,255,0)); Color color; float red, green, blue; for (int y=0; y<500; y+=100) { for (int x=0; x<500; x+=100) { red = (float) Math.random(); green = (float) Math.random(); blue = (float) Math.random(); color = new Color(red, green, blue); g.setColor(color); g.fillArc(x , y, 45, 45, 45, 270 ); } } } }