📄 mid.java
字号:
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public class MID extends MIDlet implements CommandListener
{
Display dis ;
MC mc ;
SP sp;
Command start;
// int a;
public MID()
{
super();
dis = Display.getDisplay(this) ;
mc = new MC() ;
sp = new SP() ;
start=new Command("确定",Command.OK,1);
sp.addCommand( start);
sp.setCommandListener(this);
// a=20;
//
}
protected void startApp() throws MIDletStateChangeException
{
dis.setCurrent(sp) ;
// a--;
// if(a==0)
// {
// dis.setCurrent(mc);
// mc.over=false;
// }
}
protected void pauseApp()
{
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException
{
}
public void commandAction(Command c, Displayable d)
{
if(c==start)
{
dis.setCurrent(mc);
mc.over=false;
if(mc.t==0)
{
mc.over=true;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -