Changed from JFrames to JDialogs. Only MainFrame is a JFrame