Refactoring populatePanel in the StudentContoller class.