Halihalo,
ich versuche mich gerade an meinem ersten Applet und der Compiler gibt immer 2 Fehlermeldungen,wo ich ein wenig Hilfe brauche.
Die erste Fehlermeldung ist in Zeile 11: "{² Expected
wobei ich schon versucht habe,dort eine Klammer zu setzen, hilft aber nichts und die zweite in Zeile 13:
statement expected.
Ich füge mal meinen bisherigen Code ein,wäre super,wenn mir jemand helfen könnte.
Danke schonmal!
Gruß
Frank
import java.awt.*;
import java.applet.Applet;
public class Rate_GUI extends Applet {
public static void main (String args[]){
Label _suche1, _suche2, _suche3;
Label _text1, _text2;
TextField tf_versuch1, tf_versuch2, tf_versuch3;
Button b_info, b_neu, b_versuch;
TextArea ta_info;
Font fntFett, fntHead, fntAusgabe;
public void init ( ) {
setLayout (null);
fntFett = new Font („SansSerif“, 1, 14 );
fntHead = new Font („SansSerif“, 1, 20 );
fntAusgabe = new Font(„Monospaced“, 0, 12 );
_text1 = new Label („Raten Sie die drei Ziffern“ );
_text2 = new Label („Lösungen“ );
_suche1 = new Label („X“ );
_suche2 = new Label („X“ );
_suche3 = new Label („X“ );
tf_versuch1=new TextField ("");
tf_versuch2=new TextField ("");
tf_versuch3=new TextField ("");
b_info=new Button(„Info“);
b_neu=new Button(„Neues Spiel“);
b_versuch=new Button(„Versuchen“);
ta_info=new TextArea();
_text1.setBounds (20,25,350,25);
_text2.setBounds(20,70,120,25)
_suche1.setBounds(175,70,25,25);
_suche2.setBounds(255,70,25,25);
_suche3.setBounds(335,70,25,25);
tf_versuch1.setBounds(170,110,25,25);
tf_versuch2.setBounds(250,110,25,25);
tf_versuch3.setBounds(330,110,25,25);
b_info.setBounds(20,160,80,25);
b_neu.setBounds(140,160,100,25);
b_versuch.setBounds(280,160,100,25);
ta_info.setBounds(20,210,360,140);
add(_text1); add(_text2);
add(tf_versuch1); add(tf_versuch2); add(tf_versuch3);
add(b_info); add(b_neu); add(b_versuch);
add(ta_info);
_text1.setFont ( fntHead );
_text2.setFont ( fntFett );
_suche1.setFont ( fntHead );
_suche2.setFont ( fntHead );
_suche3.setFont ( fntHead );
tf_versuch1.setFont ( fntFett );
tf_versuch2.setFont ( fntFett );
tf_versuch3.setFont ( fntFett );
b_info.setFont ( fntFett );
b_neu.setFont ( fntFett );
b_versuch.setFont( fntFett );
ta_info.setFont ( fntAusgabe );
g.setColor(Color.magenta);
}
}