Made some changes to MainWindow.java