I have also question concerning threading. I noticed that getInstance() methods in ActionManager and TargetManager are not synchronized â€“ do you assume that these classes will be accessed only from the event dispatching thread?
It may be not always the case, for the following reasons:
Most of components that in our GUIs listen for state changes of external devices â€“ so they will run in different threads (e.g threads receiving updates from a JMS broker). It is quite possible that these components want e.g. to add or remove a Targetable from TargetManager. Such action doesnâ€™t change GUI so normally it wouldnâ€™t have to be executed in the Swing thread. Without synchronization one needs to use â€˜invokeLaterâ€™. I think it would be more convenient to synchronize these methods (and maybe also some others).
What do you think?