Use a single repaint event instead of 4