posts - 134,  comments - 22,  trackbacks - 0
用GWT实现在网页上计时器的功能,用Timer就可以了。

         int k = 0;
         Timer timer 
= new Timer() {
             
int t = k;
              
public void run() {
                
// TODO Auto-generated method stub
                  t++;
                System.out.println(
"tttt==>"+t);
            }
          };

          timer.schedule(
2000);
         timer.scheduleRepeating(
1000); 
         timer.run();


posted on 2009-03-26 11:01 TRE-China R&D 阅读(1181) 评论(0)  编辑 收藏 引用 所属分类: JAVA
只有注册用户登录后才能发表评论。