import java.awt.image.*; import java.awt.*; import java.applet.Applet; public class Must extends Applet{ public Image looPilt(){ int laius=100; int korgus=100; int punktid[] = new int[laius*korgus]; int nr=0; for (int k = 0; k < 250; k++){ for (int i = 0; i < 50; i++){ punktid[nr++] = (255<<24)| 0| 0 | 0; } for (int j = 0; j < 10; j++){ punktid[nr++] = (255<<24)|255<<16 | 255<<8 | 255; } } return createImage(new MemoryImageSource(laius, korgus, punktid, 0, laius)); } public void paint(Graphics g){ Image pilt=looPilt(); g.drawImage(pilt, 0, 0, null); } public static void main(String argumendid[]){ Frame f=new Frame(); f.add(new Must()); f.setSize(200, 220); f.setVisible(true); } }