Format code + remove deprecated getText methods for JPasswordField