📄 displaymessage.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package org.challenge.chengshi.display;import javax.microedition.lcdui.Command;import javax.microedition.lcdui.CommandListener;import javax.microedition.lcdui.Display;import javax.microedition.lcdui.Displayable;import javax.microedition.lcdui.Form;import org.challenge.chengshi.MainMidlet;/** * * 此类用于显示信息 * @author challenge */public class DisplayMessage extends Form implements CommandListener { private String message; MainMidlet mid; Command backCMD=new Command("返回",Command.BACK,1); public DisplayMessage(MainMidlet mid,String m){ super(""); this.mid=mid; this.message=m; this.append(this.message); this.addCommand(backCMD); this.setCommandListener(this); show(); } void show(){ Display.getDisplay(mid).setCurrent(this); } public void commandAction(Command cmd, Displayable arg1) { if(cmd==this.backCMD){ this.mid.show(); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -