QuackX: Applet TextField gibt nichts aus

Beitrag lesen

Hallo,

wie sieht der Code dazu aus?

Gruß
Patric Steffen - http://www.schulkameraden.de

import java.applet.*;
import java.awt.*;
import java.awt.event.*;

public class Drei extends Applet implements ActionListener{

private Label headLine1 ;
  public TextField istField;
  IstWert resultistApplet, resultsollApplet;
  String ist;
  private Label headLine2 ;
  public TextField sollField;
  String soll;

public void init() {
    System.out.println("DreiControl = Applet 3");

setLayout (new FlowLayout(FlowLayout.LEFT) );
    headLine1 = new Label("IstWert");
    add(headLine1);
AppletContext browser = getAppletContext();
    resultistApplet = (IstWert) browser.getApplet("test");
istField = new TextField(" du ");
    istField.addActionListener(this);
add(istField);

headLine2 = new Label("SollWert");
    add(headLine2);

resultsollApplet = (IstWert) browser.getApplet("test1");

sollField = new TextField(" du ");  

sollField.addActionListener(this);
add(sollField);
    setVisible(true);
   }
  public void actionPerformed (ActionEvent e) {
  
ist = resultistApplet.userInputist.getText();    
    istField.setText(ist);

soll = resultsollApplet.userInputist.getText();      

sollField.setText(soll);

}
so sieht er aus