I am writing a program and I want the JTextfield to be blank after the input has been given.
For example; user inputs a number, he presses the add button and the textfield should be blank again and should not contain the number. I tried using null
but it doesnt work. If you need the code tell me, I will edit it.
Asked
Active
Viewed 219 times
-1

John Smith
- 71
- 1
- 11
-
1Please show what you tried. – Hovercraft Full Of Eels Dec 02 '16 at 01:33
-
1`null` will work if used correctly – PM 77-1 Dec 02 '16 at 01:33
-
[The many, many similar questions that can easily be found](https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=site:stackoverflow.com+java+clear+jtextfield). – Hovercraft Full Of Eels Dec 02 '16 at 01:34