gaugeupdater.java

来自「J2ME郑州公交信息查询系统」· Java 代码 · 共 39 行

JAVA
39
字号
package GongJiao;

import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.Gauge;

public class GaugeUpdater implements Runnable {

	private Gauge gau;
	Form f;
	Display dis;
	GaugeUpdater(Gauge gau,Form f,Display dis)
	{
		this.gau=gau;
		this.f=f;
		this.dis=dis;
	}
	public void run()
	{
		
		try
		{
			while(gau.getValue()<gau.getMaxValue())
			{
				Thread.sleep(100);
				gau.setValue(gau.getValue()+1);
			}
			
			/*gau.setLabel("升级完成!!!.");*/
			dis.setCurrent(f);
			
		}
		catch(InterruptedException Error)
		{
			throw new RuntimeException(Error.getMessage());
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?