【Java开源代码栏目提醒】:以下是网学会员为您推荐的Java开源代码-NonInteractiveGaugeDemo.java,希望本篇文章对您学习有所帮助。
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;
public class NonInteractiveGaugeDemo extends MIDlet implements CommandListener
{
private final static Command CMD_EXIT = new Command("Exit",Command.EXIT, 1);
private Display display;
private Gauge mGauge;
private Form mainForm;
public NonInteractiveGaugeDemo() {
display = Display.getDisplay(this);
mainForm = new Form("Gauge
演示");
mGauge = new Gauge("非交互模式",false, 5, 2);
mainForm.append(mGauge);
mainForm.addCommand(CMD_EXIT);
mainForm.setCommandListener(this);
}
protected void startApp() {
display.setCurrent(mainForm);
}
protected void destroyApp(boolean unconditional) {
}
protected void pauseApp() {
}
public void commandAction(Command c, Displayable d) {
destroyApp(false);
notifyDestroyed();
}
}