Switch to javax.swing.Timer to avoid concurrency issues