MainWindow.java small refactoring.