哪位前辈来看一下,急,刚学J2ME的菜鸟.
pl99k 2007-05-22 05:52:16 请哪位前辈来看一下,在校学生,刚学J2ME,用CommandListener的时候老是提示TestGame不是抽象的,并且未覆盖''''''该小写的和该大写的好像都大写和小写了.
下面是源码,TDK2.5,import省略.
public class TestGame extends MIDlet implements CommandListener{
private Display display;
private Form tg;
private Command exit=new Command("exit",Command.EXIT,1);
public TestGame(){
display=Display.getDisplay(this);
}
public void startApp(){
Form tg=new Form("testgame");
tg.addCommand(exit);
tg.setCommandListener(this);
display.setCurrent(tg);
}
public void CommandAction(Command c,Display d){
if(c==exit){
destroyApp(false);
notifyDestroyed();
}
}
public void pauseApp(){
}
public void destroyApp(boolean unconditional){
}
}