找书抄也能有错呀!!SOS!!!
全部代码:
package greeting;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class HelloWorld extends MIDlet implements CommandListener
{
private Display display;
private TextBox textbox;
private Command quitCommand;
public void starApp()
{
display=Display.getDisplay(this);
quitCommand =new Command("退出",Command.SCREEN,1);
textbox=new TextBox("hello World","Myfirst MiDlet", 40,40);
textbox.addCommand(quitCommand);
textbox.setCommandListener(this);
display.setCurrent(textbox);
}
public void paueApp()
{
}
public void destroyApp(boolean unconditional)
{
}
public void commandAction(Command choice,Displayable displayable)
{
if(choice==quitCommand)
{
destroyApp(false);
notifyDestroyed();
}
}
}
//////////////////////////////////////////////////////////////////////
错误提示:
--------------------Configuration: j2sdk1.4.2 <Default>--------------------
C:\test\HelloWorld.java:4: greeting.HelloWorld is not abstract and does not override abstract method pauseApp() in javax.microedition.midlet.MIDlet
public class HelloWorld extends MIDlet implements CommandListener
^
1 error
//////////////////////////////////////////////////////////////////////
我检查了文件名与CLASS名是相同的呀!那错了呀!!高手帮忙