import java.awt.*; import java.applet.*; import java.awt.event.*; public class liikumineuus extends Applet implements ActionListener{ TextField tf=new TextField(10); Label kiirus=new Label("Kiirus"); public liikumineuus(){ add(tf); add(kiirus); tf.addActionListener(this); } public void actionPerformed(ActionEvent e){ try{ //veapüünis double x=10; double y=100; double samm=1; double sammumuutus=10; double kiirus=Math.toRadians( Double.parseDouble(tf.getText())); double siinus=Math.sin(kiirus); boolean veel=true; //igavene tsukkel Graphics g=getGraphics(); while(veel){ x=samm*kiirus; samm=samm+sammumuutus; g.setColor(Color.black); g.drawOval((int)x,(int)y, 10, 10); g.drawLine((int)x+5,(int)y+10,(int)x+5,(int)y+20); g.drawLine((int)x+5,(int)y+20,(int)x+2,(int)y+40); g.drawLine((int)x+5,(int)y+20,(int)x+10,(int)y+40); g.drawLine((int)x+2,(int)y+40,(int)x-5,(int)y+60); g.drawLine((int)x+10,(int)y+40,(int)x+10,(int)y+60); Thread.sleep(100); //ooteaeg millisekundites g.setColor(Color.white); g.drawOval((int)x,(int)y, 10, 10); g.drawLine((int)x+5,(int)y+10,(int)x+5,(int)y+20); g.drawLine((int)x+5,(int)y+20,(int)x+2,(int)y+40); g.drawLine((int)x+5,(int)y+20,(int)x+10,(int)y+40); g.drawLine((int)x+2,(int)y+40,(int)x-5,(int)y+60); g.drawLine((int)x+10,(int)y+40,(int)x+10,(int)y+60); if(x