Added a panel instead of the canvas, since canvas couldnt  draw.