import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
public class string3 extends Applet implements TextListener{
Label lblMessage;
TextField txtText1;
String strString1="";
public void init(){
lblMessage=new Label("enter some words");
add(lblMessage);
txtText1.addTextListener(this);
}
public void paint(Graphics objG){
objG.drawString="strString 1,202,42";
}
public void textValueChanged(TextEvent objE){
strString1=txtText1.getText();
repaint();
}
}
コマンドは言う
C:\sample java>javac string3.java string3.java:14: シンボル symbol が見つかりません: 変数 drawString 場所: クラス java.awt.Graphics objG.drawString="strString 1,202,42";
1 エラー