import java.awt.*; import java.awt.event.*; import java.applet.Applet; public class kellproov extends Applet implements ActionListener{ int nr=1; TextField tf=new TextField("Tunnid"); TextField tf2=new TextField("Minutid"); Button nupp=new Button("OK"); public kellproov(){ add(tf); add(tf2); add(nupp); nupp.addActionListener(this); } public void paint(Graphics kellproov){ Graphics g=getGraphics(); g.setColor(Color.black); g.drawOval(100, 100, 280, 300); g.drawOval(240, 250, 3, 3); g.drawString("1", 315, 138); g.drawString("2", 352, 190); g.drawString("3", 370, 255); g.drawString("4", 352, 324); g.drawString("5", 305, 375); g.drawString("6", 237, 398); g.drawString("7", 237-78, 373); g.drawString("8", 119, 324); g.drawString("9", 102, 255); g.drawString("10", 352-235,190); g.drawString("11", 237-78, 138); g.drawString("12", 237, 112); g.drawLine(241, 252, 288, 183);//1 // g.drawLine(241, 252, 310, 210);//2 g.drawLine(241, 252, 241, 120);//12 } public void actionPerformed(ActionEvent e){ nr=Integer.parseInt(tf.getText()); repaint(); } public static void main(String argumendid[]){ Frame f=new Frame("Kell"); f.add(new kellproov()); f.setSize(500, 550); f.setVisible(true); } }