import java.awt.*; import java.awt.event.*; import java.applet.Applet; public class Pall5 extends Applet implements ActionListener{ TextField tf1=new TextField(10); Label silt=new Label("Siia tuleb vastus"); public Pall5(){ add(tf1); add(silt); tf1.addActionListener(this); } public void actionPerformed(ActionEvent e){ double x=100, y=100, kv=0, samm=15; double kastiX=150, kastiY=100, kastiLaius=20; double nurk=Math.toRadians( Double.parseDouble(tf1.getText())); Graphics g=getGraphics(); silt.setText("Lendab"); while(y<=kastiY){ g.setColor(getForeground()); g.drawOval((int)x, (int)y, 10, 10); g.drawRect((int)kastiX, (int)kastiY, (int)kastiLaius, 20); try{Thread.sleep(100);}catch(Exception viga){} g.setColor(getBackground()); g.drawOval((int)x, (int)y, 10, 10); kv=kv+1; x=x+samm*Math.cos(nurk); y=y+kv-samm*Math.sin(nurk); if(y>kastiY){ if(x>kastiX && x