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

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

本文简介:

            mainForm.append(options);

            mainForm.addCommand(CMD_SHOW);

            mainForm.addCommand(CMD_EXIT);

            mainForm.setCommandListener(this);

            firstTime =false;

        }

        display.setCurrent(mainForm);

    }

 

    protected void destroyApp(boolean unconditional) { /*抛出异常throws MIDletStateChangeException*/

    }

 

    protected void pauseApp() {

    }

 

    public void commandAction(Command c, Displayable d) {

 

        if (c == CMD_EXIT) {

            destroyApp(false);

            notifyDestroyed();

        } else if (c == CMD_SHOW) {

 

            // these are the images and strings for the choices.

            Image[] imageArray = null;

            int index = types.getSelectedIndex();

            String title = textBoxLabels[index];

            int choiceType = textBoxTypes[index];           

            boolean[] flags = new boolean[2];           

            options.getSelectedFlags(flags);

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

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

go top