On first priority, remove all program logic from the paintComponent override. Painting methods are for painting, and painting only. You have absolutely no control over how many times and how often...