# Make a cooldown on a button?



## HiImSkulte (22. Dez 2016)

Hello guys!
I want to know how I can make a cooldown on a button so you can only press it once in like 1 minute.

I implemented a Mouse Listener to check if the player presses on the button, and now I need to know how I can make a Method where a timer of 60 seconds starts and returns the cooldown and how I can make the button untouchable in this time.

Thanks for any help!
Bye!


----------



## Thallius (22. Dez 2016)

http://stackoverflow.com/questions/4044726/how-to-set-a-timer-in-java

http://stackoverflow.com/questions/6835682/how-to-disable-gui-button-in-java


----------

