replace repaint thread to swing.timer