Threading issues for Buttons???
We are facing the following problem:
User press Button 'Cancel' and then press Button 'Save'. Since we do not like the user to press Cancel and then Save we hide the dialog where the buttons are located. The action to hide the dialog is normally done just after the Cancel press, but not completely after it, just some steps behind.
In a *regular* environment the time between pressing and hiding is about 200ms. But now customer runs the app on a terminal server and this has the impact to slow down the whole processing. Instead of 200ms we have encountered 1900ms and I guess this was due to CPU-shortage.
Now I thinking about a different design with enable/disable buttons within the ActionListeners. Does it improve thread-safeness to have that kind of design? Is there a better one? (e.g. Buttonsgroups, removeing ActionListeners, etc.?) Since I have no idea about the Swing internals, I am curious if two different ActionsListeners might get threading issues or if this is prevented by some design.
There might be still the situation arise of CPU-lack, non-performing app and some additional delay which makes on a normal computer no problem, but on some terminal servers where the time-slices might get short???