请教一个程序问题,谢谢
刚学j2me用jb9和mobileset,遇到一个程序麻烦,请大家帮帮忙,不胜感激,谢谢
王森的教程第九章的一个例子
import javax.microedtion.midlet.*;
import javax.microedtion.lcdui.*;
public class hleventmidlet extends MIDLET implements CommandListener
{ private command exitcommand;
private command infor1command;
private command infor2command;
private Display display;
public hleventmidlet()
{ display=Display.getDisplay(this);
exitcommand=newcommand("exit",command.SCREEN,1);
infor1command=newcommand("infor1",command.SCREEN,2);
infor2command=newcommand("infor2",command.SCREEN,2);
}
public void startApp()
{ TextBox t=new TextBox("hellmidlet","Test string",256,0);
t.setcommandListener(this);
t.addcommand(exitcommand);
t.addcommand(infor2command);
t.addcommand(infor1command);
display.setCurrent(t);
}
public void pauseApp()
{}
public void destroyApp(boolean unconditional)
{}
public void commandAction(command c,Displayable s)
{ if(c==exitcommand) {notifyDestroyed();}
else if(c==infor1command) {notifyDestroyed();}
}
}
提示错误:
1 class hleventmidlet is public;should be declared in a file named hleventmidlet.java at line 5
2 package javax.microedtion.midlet does not exist at line 3
3 package javax.microedtion.lcdui does not exist at line 4
这是怎么回事?