import java.applet.Applet; import java.awt.Graphics; import java.awt.*; import java.lang.Runnable; public class Vaataja2 extends Applet implements Runnable{ abitahvel t5=new abitahvel(300, 200); String sp="30000v30000m"; Thread tr; Button b = new Button("/\\"); TextField tf=new TextField(); Panel alumine=new Panel(); public void init(){ setLayout(new BorderLayout()); add("Center",t5); alumine.setLayout(new BorderLayout()); alumine.add("West", b); alumine.add("Center", tf); add("North", alumine); sp=getParameter("sisu"); b.setBackground(Color.white); } public void start(){ tr=new Thread(this); tr.start(); } public void run(){ while(t5.piltg==null); t5.stringipilt(sp); } public boolean action(Event e, Object arg){ if(e.target==b){tf.setText(t5.pildistring());} return super.action(e, arg); } }