Given my swing gui is operating in the event dispatching thread, and my database model is operating in the main thread, I quickly found the gui was sluggish on repainting during long database operations (such as retrieving all records, reg exp pattern matching vs record contents etc.). While my data layer has a cache of record number / file location, the gui is still affected during these time consuming operations. To get round this I simply off loaded time consuming tasks to a SwingWorker implementation, overriding construct() and finish() methods. Given SwingWorker isnt part of the API, but rather a neat helper described by the Swing tutorial, am I even allowed to include this code in my assignment? Do I have to strip this great stuff out and go back to poor performance? My view is calling back into my controller which in turn manipulates my model. Would I have to add some home grown threading support into the controller to handle the time consuming tasks?
Thoughts and opinions welcomed.
To improve the performance (especially repainting) of your Swing GUI, y