JAVA程序在Jcteator中编译后,运行错误,在线等待帮助
import java.awt.Graphics;
class CharDemo extends java.applet.Applet
{
public void paint(Graphics g)
{
char ch1,ch2;
ch1=88;
ch2='Y';
g.drawString("ch1="+ch1,25,50);
g.drawString("ch2="+ch2,25,50);
}
}
编译没有错误,在excute File时提示:Exception in thread "main" java.lang.nosuchmethodError:main
这样的Applet小程序是不是不能够直接在Jcreator中执行呀?