import java.applet.Applet; import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; public class paike extends Applet implements ActionListener{ TextField kiiri=new TextField(""); TextField korruseid=new TextField(""); Button nupp=new Button(" Joonista "); public void init(){ add(kiiri); add(korruseid); add(nupp); nupp.addActionListener(this); kiiri.addActionListener(this); korruseid.addActionListener(this); } public void actionPerformed(ActionEvent e){ int nr=Integer.parseInt(kiiri.getText().trim()); int nr2=Integer.parseInt(korruseid.getText().trim()); Graphics g=this.getGraphics(); g.setColor(Color.white); g.fillRect(0, 0, getSize().width, getSize().height); int x=0; int y=0; int f=100; int x1=0; int n=nr*40; int n2=nr2*40; // joonistab korruseid for (int k1=0; k1