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

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

本文简介:

                                                typeStrings, null);

            mainForm.append(types);

           

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

            // "2 Seconds", "4 Seconds", "8 Seconds" or "Forever"

            ChoiceGroup timeouts = new ChoiceGroup("Timeout", ChoiceGroup.POPUP,

                                                   timeoutStrings, null);

            mainForm.append(timeouts);

   

            // a check-box to add an indicator to the alert

            String[] optionStrings = { "Show Indicator" };

            ChoiceGroup options = new ChoiceGroup("Options", Choice.MULTIPLE,

                                                  optionStrings, null);

            mainForm.append(options);

            mainForm.addCommand(CMD_SHOW);

            mainForm.addCommand(CMD_EXIT);

            mainForm.setCommandListener(new AlerListener(types, timeouts, options));

            firstTime = false;

        }

        display.setCurrent(mainForm);

    }

 

    private class AlerListener

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

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

go top