import java.awt.*; import java.applet.Applet; public class TubeImage extends Applet { void paintCircle(Graphics g, int x, int y, int w, int h) { Color color = new Color((int)(Math.random() * 256), (int)(Math.random() * 256), (int)(Math.random() * 256)); g.setColor(color); g.fillOval(x, y, w, h); if (w > 0) paintCircle(g, x + 2, y + 2, w - x, h - y); } public void paint(Graphics g) { Dimension d = getSize(); paintCircle(g, 0, 0, d.width, d.height); } }