implemented createPanelArray method