Unable to create MIDlet FullCanvasTest
java.lang.InstantiationException:Class not a MIDlet
at com.sun.midp.midlet.MIDletState.createMIDlet(+51)
at com.sun.midp.midlet.Selector.run(+22)
是什么原因产生的错误,请高手指教
------解决方法--------------------------------------------------------
你没有继承MIDlet就不可以执行啊
你另外再写一个类
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class CanvasTestMIDlet extends MIDlet{
private Display display;
public CanvasTestMIDlet(){
display=Display.getDisplay(this);
}
public void startApp(){
MyGame gameCanvas = new MyGame();
display.setCurrent(gameCanvas);
}
public void pauseApp(){
}
public void destroyApp(boolean unconditional){
}
}