?
Ich habs jetz geschaft...
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class test1 extends Applet implements ItemListener, ActionListener
{
CheckboxGroup CbG1;
Checkbox a, b;
TextField Tf1;
public void init()
{
setLayout(null);
setSize(400,200);
Tf1 = new TextField("Leer");
CbG1 = new CheckboxGroup();
a = new Checkbox("eins..",CbG1,false);
b = new Checkbox("zwei..",CbG1,false);
a.setBounds(10,10,80,20);
b.setBounds(10,30,80,20);
Tf1.setBounds(10,50,80,20);
add(a);
add(b);
add(Tf1);
a.addItemListener(this);
b.addItemListener(this);
}
public void actionPerformed(ActionEvent e)
{
/* if(e.getSource() == a)
{
System.exit(0);
}
*/ }
public void itemStateChanged(ItemEvent l)
{
if(CbG1.getSelectedCheckbox() == b)
{
Tf1.setText("JAAAA");
}
}
}