while ( true ) { try { Thread.sleep( updateInterval ); } catch (InterruptedException e ) { return; } repaint(); }
if ( updateThread == null ) { updateThread = new Thread(this); updateThread.start(); }
if ( updateThread != null ) { updateThread.stop(); updateThread = null; }