环境:jdk1.4.2 + WTK2.0
出错信息:
C:\WTK20\apps\MyApps\src\game\FirstGame\Draw.java:11: game.FirstGame.Draw is not abstract and does not override abstract method destroyApp(boolean) in javax.microedition.midlet.MIDlet
public class Draw extends MIDlet implements CommandListener {
^
1 error
com.sun.kvem.ktools.ExecutionException
Build failed
程序源码:
package game.FirstGame;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import java.io.*;
public class Draw extends MIDlet implements CommandListener {
Display display;
private SimpleGameCanvas canvas;
private Command exitCommand =
new Command("Exit", Command.EXIT, 60);
public Draw () {
display = Display.getDisplay(this);
canvas = new SimpleGameCanvas();
canvas.addCommand(exitCommand);
}
public void startApp(){
display.setCurrent(canvas);
}
public void pauseApp(){
}
public void destoryApp(boolean unconditional){
display.setCurrent((Displayable)null);
}
}
出错信息:
C:\WTK20\apps\MyApps\src\game\FirstGame\Draw.java:11: game.FirstGame.Draw is not abstract and does not override abstract method destroyApp(boolean) in javax.microedition.midlet.MIDlet
public class Draw extends MIDlet implements CommandListener {
^
1 error
com.sun.kvem.ktools.ExecutionException
Build failed
程序源码:
package game.FirstGame;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import java.io.*;
public class Draw extends MIDlet implements CommandListener {
Display display;
private SimpleGameCanvas canvas;
private Command exitCommand =
new Command("Exit", Command.EXIT, 60);
public Draw () {
display = Display.getDisplay(this);
canvas = new SimpleGameCanvas();
canvas.addCommand(exitCommand);
}
public void startApp(){
display.setCurrent(canvas);
}
public void pauseApp(){
}
public void destoryApp(boolean unconditional){
display.setCurrent((Displayable)null);
}
}