Implement paintEvent handler