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

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

本文简介:

l         不能被其他的Form或者Alert使用

l         不能加入Command

l         不能有Label

l         不能自己设定等效线的位置。

l         不能自己设定组件的大小。

 

大家可以参考如下的代码:

import javax.microedition.lcdui.*;

import javax.microedition.midlet.*;

public class AlertWithIndicatorMIDlet extends MIDlet

implements CommandListener

{

        private Display display;

        public AlertWithIndicatorMIDlet()

        {

                display = Display.getDisplay(this);

        }

        Gauge g ;

        public void startApp()

        {

                Alert al = new Alert("处理中");

                al.setType(AlertType.INFO);

                al.setTimeout(Alert.FOREVER);

                al.setString("系统正在处理中");

 

                g = new Gauge(null,false,10,0) ;

                al.setIndicator(g);

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

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

go top