public void actionPerformed(ActionEvent e) {
   String s = tf.getText();
   long l = Long.parseLong(s);
   if (l > hoogsteGetal) {
     hoogsteGetal = l;
   }
   repaint();
 }
 public void actionPerformed(ActionEvent e) {
   getal2 = Long.parseLong(tekstvak.getText());
   repaint();
   if (cijfer3 == 0) {
     cijfer3 = getal2;
   }
   if (getal2 > getal1) {
     getal1 = getal2;
     tekstvak.setText(null);
   }
   if (getal2 < cijfer3) {
     cijfer3 = getal2;
   }
   tekstvak.setText(null);
   repaint();
 }