本源代码包括J2ME开发精解 该书的全部章节的示例代码
源代码在线查看: rmsmidlet.java
package com.j2medev.chapter4;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class RMSMIDlet extends MIDlet {
private Display display = null;
private MainCanvas canvas = null;
public void startApp() {
initMIDlet();
}
private void initMIDlet(){
if(display == null)
display = Display.getDisplay(this);
canvas = new MainCanvas(this);
display.setCurrent(canvas);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void exit(){
destroyApp(false);
notifyDestroyed();
}
}