import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
public class string4 extends Applet implements TextListener{
Label lblMessage;
TextField txtText1;
String strString1="";
Font fntFont=new Font("Georgia",Font.Bold,20);
public void init(){
lblMessage=new Label("enter some words");
add(lblMessage);
txtText1=new TextField(20);
add(txtText1);
txtText1.addTextListener(this);
}
public void paint(Graphics objG){
objG.setFont(fntFont);
objG.drawString="strString 1,202,62";
}
public void textValueChanged(TextEvent objE){
strString1=txtText1.getText();
}
}
this the edited one,,I tried it but still have an error this is what the cmd says C:\sample java>javac string4.java string4.java:8: cannot find symbol symbol : variable Bold location: class java.awt.Font Font fntFont=new Font("Georgia",Font.Bold,20);
string4.java:18: cannot find symbol symbol : variable drawString location: class java.awt.Graphics objG.drawString="strString 1,202,62";
2 errors