Hey guys!
I've built a form with Netbeans's visual editor. When I press one of the buttons it should do the following :
- set it to disabled
- perform a task that takes some time
- when the task finishes the button will be enabled again
However, the following happens:
- the button remains in a pressed state until the task finishes
- when the task finishes, the enabling/disabling of buttons will be very fast (they will happen, but you won't notice them)
This behaviour is not something I want. I tried using repaint on the JButton, on the JFrame and even on the JPanel containing the button, but I can't seem to get it to do what I want. Some hints?