How can I get text from text field without pressing `Enter` with Java?

```
private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {                                            
       nom=jTextField1.getText();

} 

```