Update mainWindow.java

Put the grade and window code in the main function and made all objects static so the main window is able to use them. And also, fixed the added repetition of grade and credits when you press calculate