import java.awt.*; import java.awt.event.*; import java.applet.Applet; public class KellaJuht extends Applet implements ActionListener{ TextField tfMinutid=new TextField(); TextField tfTunnid=new TextField(); TextField tfSekundid=new TextField(); Button juhtnupp=new Button("Käivita"); Kell2 kell=new Kell2(); static final long serialVersionUID=1; public KellaJuht(){ Panel ajapaneel=new Panel(new GridLayout(1, 3)); ajapaneel.add(tfTunnid); ajapaneel.add(tfMinutid); ajapaneel.add(tfSekundid); Panel ylapaneel=new Panel(new GridLayout(2, 1)); ylapaneel.add(juhtnupp); ylapaneel.add(ajapaneel); setLayout(new BorderLayout()); add(ylapaneel, BorderLayout.NORTH); add(kell, BorderLayout.CENTER); } public void actionPerformed(ActionEvent e){ } public static void main(String[] arg){ Frame f=new Frame("kella juht"); f.add(new KellaJuht()); f.setSize(300, 300); f.setVisible(true); } }