import java.applet.*; import java.awt.*; import java.lang.*; import java.util.*; public class Te extends Applet { private int last_x=0; private int last_y=0; private int kx, ky, kirjutus; private int raadius=1, x1, y1, x2, y2; private Color current_color=Color.black; private Button clear_button; Ring ring; Es es=null; Te teo=null; Ring[] hulk=new Ring[100]; private int il, ringe=0; public void init(){ this.setBackground(Color.white); clear_button=new Button("Puhasta"); clear_button.setForeground(Color.black); clear_button.setBackground(Color.lightGray); this.add(clear_button);} public void paint(Graphics g){ int i; g.setColor(Color.black); for(i=0;i-1;i--){ kaugus=(int)Math.sqrt((hulk[i].x-x)*(hulk[i].x-x)+(hulk[i].y-y)*(hulk[i].y-y)); if(hulk[i].r==kaugus){j=i; while(j