displaytest.java

来自「作为参考」· Java 代码 · 共 31 行

JAVA
31
字号
/* * To change this template, choose Tools | Templates * and open the template in the editor. */import javax.microedition.midlet.*;//导入MIDlet包import javax.microedition.lcdui.*;//导入lcdui包/** * @author hp */public class DisplayTest extends MIDlet{   //类定义    private Display display;   //引用MIDlet的Display对象    private TextBox t;  //t是一个Displayable对象//初始化    public DisplayTest(){    //构造函数    display=Display.getDisplay(this);  //获取唯一的Display实例    t= new TextBox("Display Text","Display对象调试",100,0);    }    public void startApp() {    display.setCurrent(t);//把t设置为当前Displayable对象    }    public void pauseApp() {    }    public void destroyApp(boolean unconditional) {    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?