title: on press button textfield in javafx
body: <p>i have a form for creating new <strong>user</strong>,and i want when i write a <strong>username</strong> which exists in my <code>database</code> to show me the image with the <code>X</code> or the <strong>image</strong> with a <strong>cross</strong>.But it doesn't show me like i want,if i write <strong>username</strong> <strong>someusername</strong> and the <strong>someusername</strong> exists in my <code>database</code> it need to set the <strong>image</strong> to be the <code>X_image</code> otherwise the <code>cross_image</code> ,i write some code..</p>
  
  <pre><code>@FXML
  private void onChangeUserField() {
      if( (usernameField.getText() == null || usernameField.getText().length() == 0)
              || UserController.existUser(usernameField.getText())){
          usernameVerifyField.setImage(Config.thex_image);
      } else {
          usernameVerifyField.setImage(Config.cross_image);
      }
  }
  </code></pre>
  
  <p>and for this code if i have a user with "<strong>someusername</strong>" username in <code>database</code> , when i write "<strong>someusername</strong>" in the <code>textfield</code> it show me the <code>x_image</code> ,and if i add just one "e" like "<strong>someusernamee</strong>" it show me the <code>cross_image</code> ..</p>
  
  <p><strong>Question</strong> :- why it show me like that?</p>