Added PaintComponent functionality