Click here to Skip to main content
15,880,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want change the lable of JButton from "one" to "two" after 5 mins, when ever user clicks on that.

can you please provide your suggestions ASAP. I'd appreciate if you would be kind enough to share your experience.

Thanks in advance.
Posted
Updated 26-Apr-12 5:05am
v2

1 solution

Java Tutorials[^]

How to write an ActionListener[^]

You will have to use an ActionListener, which will be triggered when the button is pressed. That one then can change the label text of the button.

Waiting 5 Minutes requires a Thread:

Tutorial on threads[^]

I can also recommend to buy a good old fashion book, that one reveals such secrets most ASAP.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900