📄 samplemidlet.java
字号:
package com.j2medev.chapter5;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class SampleMIDlet extends MIDlet {
protected Display m_Display;
protected SampleCanvas m_Canvas;
public SampleMIDlet() {
this.m_Display = Display.getDisplay(this);
this.m_Canvas = new SampleCanvas(this.m_Display);
this.m_Canvas.m_MIDlet = this;
}
/**
* destroyApp
*
* @param _boolean boolean
* @throws MIDletStateChangeException
* @todo Implement this javax.microedition.midlet.MIDlet method
*/
protected void destroyApp(boolean _boolean) throws
MIDletStateChangeException {
notifyDestroyed();
}
/**
* pauseApp
*
* @todo Implement this javax.microedition.midlet.MIDlet method
*/
protected void pauseApp() {
this.m_Display.setCurrent(null);
}
/**
* startApp
*
* @throws MIDletStateChangeException
* @todo Implement this javax.microedition.midlet.MIDlet method
*/
protected void startApp() throws MIDletStateChangeException {
this.m_Display.setCurrent(this.m_Canvas);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -