import java.awt.*;import java.applet.Applet;public class Mittelwert extends Applet { Label l_ueberschrift; TextField tf_minEingabe, tf_maxEingabe, tf_ergebnis; Button b_getErg, b_del; Font fntEbi; public void init() { setLayout(null); setBackground(Color.orange); fntEbi = new Font("Sansserif", 0, 14); l_ueberschrift = new Label("Dieses Applet berechnet Mittelwerte"); l_ueberschrift.setBounds(75, 50, 400, 25); l_ueberschrift.setFont(fntEbi); add (l_ueberschrift); tf_minEingabe = new TextField(""); tf_minEingabe.setBounds(75, 120,120, 25); add (tf_minEingabe); tf_maxEingabe = new TextField(""); tf_maxEingabe.setBounds(220, 120, 120, 25); add(tf_maxEingabe); tf_ergebnis = new TextField(""); tf_ergebnis.setBounds(125, 270, 150, 25); add(tf_ergebnis); b_getErg = new Button("Rechne Mittelwert"); b_getErg.setBounds(125, 220, 150, 25); b_getErg.setBackground(Color.lightGray); add(b_getErg); b_del = new Button("Loeschen"); b_del.setBounds(125, 320, 150, 25); b_del.setBackground(Color.lightGray); add(b_del); } float berechneMw (float z1, float z2) { float resultat; float z3 = z1+z2; resultat = z3/2; return resultat; } public boolean handleEvent(Event e) { if (e.target == b_getErg && e.id == Event.ACTION_EVENT) { getErgClicked(); } if (e.target == b_del && e.id == Event.ACTION_EVENT) { delClicked(); } return false; } private void delClicked() { tf_minEingabe.setText(""); tf_maxEingabe.setText(""); tf_ergebnis.setText(""); } private void getErgClicked() { }}