@Override
	  public void mousePressed(MouseEvent e){
		  String name, username;
		  char[] password, passwordConfirmation;
		  name = registerPanel.getName();
		  username = registerPanel.getUsername();
		  password = registerPanel.getPassword();
		  passwordConfirmation = registerPanel.getPasswordConfirmation();
		  if(name.isEmpty() || username.isEmpty() || password.length == 0 || passwordConfirmation.length == 0)
			  showErrorMessage(FIELDS_EMPTY);
		  else
			  if(!Arrays.equals(password,passwordConfirmation))
				  showErrorMessage(PASSWORD_CONFIRMATION_NOT_MATCH);
			  else{
				  String stringPassword = registerPanel.getStringPassword();
				  if(!name.matches(PATTERN) || !username.matches(PATTERN) || !stringPassword.matches(PATTERN))
					  showErrorMessage(ILLEGAL_CHARACTERS);
				  else
					  client.register(username, stringPassword, name);
			  }
	  }