At the end of the operation performed, call buttonObject.setEnabled(false);
The question seems too trivial to ask, maybe you're looking for an automatic solution? In case of that, I do not know and I hope someone with proper Swing experience would come along and answer that.
P.s. Is there, by any chance or anything similar to, a formObject.isDirty() call? You could use that in a validator function that keeps listening.