Added paintComponent() method.