updated MainFrame.java