import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
/**
*
* Beschreibung
*
* @version 1.0 vom 12.09.2011
* @author
*/
public class Oberflaeche extends Applet {
// Anfang Attribute
private TextField textField1 = new TextField();
private TextField textField2 = new TextField();
private TextField textField3 = new TextField();
private TextField textField4 = new TextField();
private TextField textField5 = new TextField();
private TextField textField6 = new TextField();
private Label label1 = new Label();
private Label label2 = new Label();
private Label label3 = new Label();
private Label label4 = new Label();
private Label label5 = new Label();
private TextField strecke = new TextField();
private Button button1 = new Button();
// Ende Attribute
public void init() {
Panel cp = new Panel(null);
cp.setBounds(0, 0, 558, 300);
add(cp);
// Anfang Komponenten
textField1.setBounds(24, 40, 81, 24);
textField1.setText("textField1");
cp.add(textField1);
textField2.setBounds(24, 72, 81, 24);
textField2.setText("textField2");
cp.add(textField2);
textField3.setBounds(144, 40, 81, 24);
textField3.setText("textField3");
cp.add(textField3);
textField4.setBounds(144, 72, 81, 24);
textField4.setText("textField4");
cp.add(textField4);
textField5.setBounds(264, 40, 81, 24);
textField5.setText("textField5");
cp.add(textField5);
textField6.setBounds(264, 72, 81, 24);
textField6.setText("textField6");
cp.add(textField6);
label1.setBounds(32, 16, 55, 16);
label1.setText("Punkt A");
label1.setFont(new Font("MS Sans Serif", Font.PLAIN, 13));
cp.add(label1);
label2.setBounds(8, 48, 18, 16);
label2.setText("X");
label2.setFont(new Font("MS Sans Serif", Font.PLAIN, 13));
cp.add(label2);
label3.setBounds(8, 80, 19, 16);
label3.setText("Y");
label3.setFont(new Font("MS Sans Serif", Font.PLAIN, 13));
cp.add(label3);
label4.setBounds(152, 16, 55, 16);
label4.setText("Punkt B");
label4.setFont(new Font("MS Sans Serif", Font.PLAIN, 13));
cp.add(label4);
label5.setBounds(272, 16, 55, 16);
label5.setText("Punkt C");
label5.setFont(new Font("MS Sans Serif", Font.PLAIN, 13));
cp.add(label5);
strecke.setBounds(88, 128, 97, 24);
strecke.setText("strecke");
cp.add(strecke);
button1.setBounds(208, 128, 129, 25);
button1.setLabel("Berechne Strecke");
^ button1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
button1_ActionPerformed(evt);
}
});
cp.add(button1);
// Ende Komponenten
}
// Anfang Methoden
public void button1_ActionPerformed(ActionEvent evt) {
// TODO hier Quelltext einfügen