Sleep in Java behaving weirdly, with GUI, not running GUI commands till end
This is my first time working with threads so I apologize if the answer to this is simple. I have a GUI and when the user clicks a button, I want it to update the text to display the fact that a task had been completed, and a few seconds later return to its normal state. I have the following code: