override paintComponent instead of paint to avoid animation flickering