Use swing timer instead of threads/sleep.