J2ME中文教程 3 MIDP高级UI 的使用[14]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

    private final static String[] timeoutStrings = {

            "2 Seconds", "4 Seconds", "8 Seconds", "Forever"

        };

    private final static int SECOND = 1000;

    private Display display;

   

    private boolean firstTime;

   

    private Form mainForm;

   

    public AlertDemo() {

        firstTime = true;

        mainForm = new Form("Alert Options");

    }

   

    protected void startApp() {

        display = Display.getDisplay(this);

        showOption();

    }

 

    /**

     * 制造这个MIDlet的基本显示

     * 在这个Form里面我们可以选择Alert的个中类型和特性

     */

    private void showOption() {

        if(firstTime) {               

            // choice-group for the type of the alert:

            // "Alarm", "Confirmation", "Error", "Info" or  "Warning"

            ChoiceGroup types = new ChoiceGroup("Type", ChoiceGroup.POPUP,

本文关键:J2ME中文教程 3 MIDP高级UI 的使用
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top