Added deleteComponent and changes in paintComponent