Refactor to remove private paint-canvas function
Added repaint on resize of Swing window