相关代码 |
|
import java.awt.Graphics; import java.applet.Applet; public class FirstApplet extends Applet{ public String outStr; public void init(){ outStr = new String("How are you"); System.out.println(outStr); } public void paint(Graphics g){ g.drawString(outStr,60,60); //System.out.println("How are you"); } }