Hi folks,
I have written a framework that does calculations that take a long time to execute (about 15 minutes). I now want to write an interface in Swing which will gather the data from the database and execute this calculations.
I just wondered now how to do that best practice? If I do time intensive computations in the event thread the whole interface freezes until the code is finished.
I started to think that I will create an Object which can handle all the calculation task, but what do I do with the state informations about progress and status during the execution. I also have several actions that can be executed, e.g. different calculations that need different data. Do have to write an object for each action? If I separate the view and the calculation I have to exchange the data - what is the best practice for that?
Thanks and best regards
Marco