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);