为什么我的run()不运行
package test20;
import javax.microedition.lcdui.*;
public class Displayable3 extends Canvas implements CommandListener,Runnable {
int i=0;
public void run() {
i++;
repaint();
try {
Thread.sleep(1000);
}
catch (InterruptedException e) {
}
}
public Displayable3() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
setCommandListener(this);
addCommand(new Command("Exit", Command.EXIT, 1));
run();
}
public void commandAction(Command command, Displayable displayable) {
}
protected void paint(Graphics g) {
System.out.println(i);
}
}
结果是系统输出一个1就什么都没有了