2010-05-31 126 views

回答

2

嘗試。

try { 
        timer = new Timer(); 
        timer.scheduleAtFixedRate(new ImageTask(), 0, 5000); 
       } catch (Exception e) { 
        // do nothing 
       } 

       private class ImageTask extends TimerTask { 
        public void run() { 
         System.out.println("Test Printing.."); 

        } 
       }