Move revalidate() and repaint() to resetElements() method in PaintPanel
class