⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 screentest2.java

📁 《精彩的手机UI例程.zip》是很好的手机编辑软件
💻 JAVA
字号:

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class ScreenTest2 extends MIDlet {
    private Display display;
    private Form s1;
    private Image iv;
    
    public ScreenTest2() {
        s1 = new Form("Screen 1");
        Image img=null;
        try {
            img= Image.createImage("/coolfish.png");
        }catch(Exception e) {
            System.out.println(e.getMessage());
        }
        s1.append(new ImageItem("ImageView",img,ImageItem.LAYOUT_CENTER,"Image can not display"));
    }
    public void startApp() throws MIDletStateChangeException {
        display=Display.getDisplay(this);
        display.setCurrent(s1);
    }

    /**
     * Pause the MIDlet
     */
    public void pauseApp() {
    }

    /**
     * Called by the framework before the application is unloaded
     */
    public void destroyApp(boolean unconditional) {
        display=null;
        s1=null;
    }   
}

⌨️ 快捷键说明

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