It'd be nice to have more distinguishable variables naming. `painting` and `paint` are very alike. Probable better use paintingWidget and paintComponent (also, I'm sure you can also find a better name for PaintComponent)