How to pause execution for X milliseconds in AWTEventQueue
I have a game where I want to flash a component a red color, and then back to it’s normal color. If I set it to red, and then back to normal, the flash happens way too quickly. Obviously, I could just do Thread.sleep(123)
, but that is EXTREMELY undesirable because it breaks stuff on my UI. Plus, I am pretty sure that is not what I am supposed to do here.