extracted code from MainPage.java and put it in WestPanel.java