Added test code and made changes to DrawPanel and FigurePanel