You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
have access to post topics
communicate privately with other members (PM)
not see advertisements between posts
have the possibility to earn one of our surprises if you are an active member
access many other special features that will be introduced later.
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
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.