then i"ll have to keep a switch case in onpaint() for different buttons clicked and different shapes drawing. which does not seem to be a fair solution.