I want to create a timer for the screen in an application to be frozen. Let’s say like two seconds. I don’t want the screen to react to any on screen button clicks. Is this “frowned” upon? Or is there another way of going about this.
My application:

User click:

I want to then pause everything for two seconds (so my other buttons listeners don’t go off) and then I want the listeners to go back, because I’ll turn the button back from green to grey.
In the click handler you could change the color and remove the onclick listener for all buttons and start a background thread that does your timing. When the background thread has slept for 2 minutes then you can add the onclick listeners back for all buttons. That way you don’t create a UI that is totally unresponsive, but you achieve the effect of disabling the buttons.
Create one instance of this listener and use it for every button.