Modified MainWindow.java