/* Generate 100 random numbers between 1 and 10, and draw them on the Aplet panel in rows of 10 */ import java.awt.*; import javax.swing.*; public class RandomIntegersApplet1 extends JApplet { public void paint (Graphics page) { int x = 25; int y = 25; int value; for (int i = 1; i <= 100; i++) { value = (int) (Math.random() * 10 + 1); page.drawString (Integer.toString(value), x, y); if ( i % 10 != 0 ) x = x + 40; else { x = 25; y = y + 15; } } } }