import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class maja3 extends Applet implements ActionListener{ TextField tf=new TextField("5"); int korrustearv=0; int sinine=0; public maja3(){ add(tf); tf.addActionListener(this); } public void paint(Graphics ekraan){ setBackground(Color.white); Image pilt1=getImage(getCodeBase(), "vares.jpg"); ekraan.drawImage(pilt1, 169, 22, this); korrustearv=Integer.parseInt(tf.getText().trim());//mitu korrust kasutaja tahab, textboxist int y=60; //akna oma int x=200;//akna oma int korrustevahe=0;//lugeja while(korrustevahe