import java.applet.*;import java.awt.*;import java.awt.event.*;/*<applet code="Probe.class" width="300" height="200"></applet>*/public class Probe2 extends Applet implements ActionListener { TextField eing1,eing2, erg; Button b_hier; Button b_loeschen; public float betrag2; public float betrag; public float meinBetrag; public int ausf; public void init() { eing1 = new TextField(); eing2 = new TextField(); erg = new TextField(); b_hier = new Button("hier"); b_loeschen = new Button("loeschen"); setLayout(null); b_loeschen.setBounds(10,20,100,20); b_hier.setBounds(10,70,100,20); eing1.setBounds(150,20,100,20); eing2.setBounds(250,20,100,20); erg.setBounds(200,50,100,20); add(eing1); eing1.addActionListener(this); add(eing2); eing2.addActionListener(this); add(b_hier); b_hier.addActionListener(this); add(erg); erg.addActionListener(this); add(b_loeschen); b_loeschen.addActionListener(this); } public void actionPerformed(ActionEvent event) { if (event.getSource() == eing1) { float betrag = Float.parseFloat(eing1.getText()); } if (event.getSource() == eing2) { float betrag2 = Float.parseFloat(eing2.getText()); } if (event.getSource() == b_hier) { meinBetrag.rechne(); int ausf = (int) meinBetrag; erg.setText(ausf); } public float rechne(betrag,betrag2);{ meinBetrag = betrag - betrag2; return meinBetrag; } }