change main panel's layoutmanager to GridLayout