import java.applet.Applet; import java.awt.event.*; import java.awt.*; import java.awt.Graphics; public class Arvutus1 extends Applet{ int vanax = 50; int vanay = 50; int uusx = 50; int uusy = 50; public void paint(Graphics g){ while(vanax<500){ uusx++; int uusy=(int)(50*Math.sin(uusx/10.0))+100; g.drawLine(vanax, vanay, uusx, uusy); vanay=uusy; vanax=uusx; } } }