Re: how to disable a JButton while an op completes?



> myButton.setEnabled(false);
> doTask();
> myButton.setEnabled(true);

Simply doing this does not work. I don't understand why. Java still
alllows me to press the button while doTask is executing. Please
explain this.

.