I have a JFrame that has some JTextFields. I need to clear all the JTextField when I click on Jbutton. How can I do that? I don't want to clear them one by one.
Any ideas?
I need your help
:o
Thanks
Printable View
I have a JFrame that has some JTextFields. I need to clear all the JTextField when I click on Jbutton. How can I do that? I don't want to clear them one by one.
Any ideas?
I need your help
:o
Thanks
:) You need to clear them one by one.. Just call setText("") method for each of the textfields you have from the click event handling code of your JButton. There is no other way for this. ;)