I have a jButton that calls a function. This function can take up to a minute to complete. During this time the jButton stays pressed. Is there a way to unpress the jButton?
I have tried
jButton.setEnabled(true);
jButton.setEnabled(false);
but these do not seem to help.
Don’t do the minute of processing in the GUI thread. Use a
SwingWorkerinstead.