Example for painting with MouseEvents