Clear JTextFields

How to clear a JTextField field after entering anything into this field? Note. I created JTextFields in my JOptionPane

+4
source share
3 answers

It’s good to clear JTextField , if you have a link to it, you can set the text to ""

 field.setText(""); 
+14
source

To clear a specific call to JTextField field.setText("") . If you need anything else, check out your question.

+3
source

Just call the instance method setText("") for the text fields.

+2
source

All Articles