Refactoring in RegistrationJFrame