refreshing a JButton

I have a JButton with text on it, and I'd like to refresh that button with new text when it is clicked.  Is there a way to do this without refreshing the whole JFrame?
swp3h6Asked:
Who is Participating?
 
CEHJCommented:
button.setText("new text");
0
 
CEHJCommented:
(Put that in actionPerformed of your handler)
0
 
swp3h6Author Commented:
wow thats easy... i looked for such a method, but was unable to find it.

thanks!
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.