当前页面: 开发资料首页 → J2ME 专题 → 请教关于子界面退出程序的问题
请教关于子界面退出程序的问题
摘要: 请教关于子界面退出程序的问题
我做一个系统,主界面调用一个Form类界面,我想在Form界面退出,用什么方法.
public class ClentMain extends MIDlet implements CommandListener {
........
protected void startApp() throws MIDletStateChangeException {
display.setCurrent(mainList);
}
protected void pauseApp() {
}
protected void destroyApp(boolean p1) {
}
public void commandAction(Command c, Displayable d) {
if (c == selectCommand) {
login mainui = new login(this,mainList);
display.setCurrent(mainui);
}
}
public class login extends Form implements CommandListener {
public login(MIDlet midlet,Displayable parent) {
super("登陆");
//如何在这个界面退出整个程序 display.notify();好像不行
}
}
midlet.destroyApp(true);
midlet.notifyDestroyed();