I have 2 textfields in my project. The first textfield is txtNumA and the second is txtNumB. I disabled txtNumB. When txtNumA is not empty, txtNumB will be enabled. 

Well, this is part of code I've tried:

```
private void txtNumKeyTyped(java.awt.event.KeyEvent evt) {                                   
    if(!(txtNumA.getText().trim().equals(""))){  
        txtNumB.setEnabled(true); 
    }
    else { 
        txtNumB.setText(null);
        txtNumB.setEnabled(false);
    } 
}

```

Actually it works, but not perfect. It works only if I typed 2 or more characters in txtNumA. What I need is when I typed one character and more, txtNumB will be enabled. 

What's wrong with my code?