this.comp = comp; this.timediff = timediff; shouldRun = true; setName("TimerThread(" + timediff + " milliseconds)");
while (shouldRun) { try { comp.repaint(); sleep(timediff); } catch (Exception e) {} }