Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/backbone.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java me 在symbian中设置报警箱中的仪表_Java Me - Fatal编程技术网

Java me 在symbian中设置报警箱中的仪表

Java me 在symbian中设置报警箱中的仪表,java-me,Java Me,我想在警报中设置gauge对象以显示进度,但它给出了java.lang.IllegalArgumentException public class AlertTest extends MIDlet implements CommandListener { Display display; TextBox txtbox; Command cmd; public void startApp() { display=Display.getDisplay(this); txtbox=ne

我想在警报中设置gauge对象以显示进度,但它给出了java.lang.IllegalArgumentException

public class AlertTest extends MIDlet implements CommandListener {
Display display;
TextBox txtbox;
Command cmd;
public void startApp() {
    display=Display.getDisplay(this);
    txtbox=new TextBox("Message", null, 160, 0);
    cmd=new Command("Send", Command.OK, 1);
    txtbox.addCommand(cmd);
    txtbox.setCommandListener(this);
    display.setCurrent(txtbox);
}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}
public void commandAction(Command c,Displayable d){
     Gauge gauge = new Gauge("", false, Gauge.INDEFINITE, Gauge.CONTINUOUS_RUNNING);
     Alert retrieve = new Alert("Retrieving Contacts");       
            retrieve.setIndicator(gauge);
            display.setCurrent(retrieve,txtbox);
}
}


如何解决此问题?

仪表标签在警报中使用时应设置为空:

例如:

Gauge gauge = new Gauge(null, false, Gauge.INDEFINITE, Gauge.CONTINUOUS_RUNNING);
马可