incrementalindefinitegaugerunnable.java
来自「J2ME手机游戏开发技术详解随书光盘」· Java 代码 · 共 32 行
JAVA
32 行
import javax.microedition.lcdui.*;public class IncrementalIndefiniteGaugeRunnable extends Gauge implements Runnable { private boolean done = false; /** * The constructor initializes the gauge. */ public IncrementalIndefiniteGaugeRunnable(String label) { super(label, false, Gauge.INDEFINITE, Gauge.INCREMENTAL_IDLE); new Thread(this).start(); } /** * This method moves the gauge left and right. */ public void run() { while (!done) { setValue(Gauge.INCREMENTAL_UPDATING); try { Thread.currentThread().sleep(1000); } catch (InterruptedException err) { } } } void setDone() { done = true; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?