欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
 
try {
  // 创建一个线程
  Thread thread = new Thread() {
  public void run() {
   int i = 0;
   while(true){
   final long start = System.currentTimeMillis();
   try {
    Thread.sleep(1);
   } catch (InterruptedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
   }
   final int a = i;
   if (!Display.getDefault().isDisposed()) {
    Runnable runnable = new Runnable() {
    public void run() {
     processModel.setProcessName(start + "---" + a);
    }
    };
    Display.getDefault().syncExec(runnable);
   }
   i++;
   }
  }
  };
  thread.start();
 } catch (Exception e) {
  e.printStackTrace();
 }

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/dcsyl/51493.shtml