I wrote a framework that performs calculations that take a lot of time (about 15 minutes). Now I want to write an interface in Swing that will collect data from a database and perform these calculations.
I just thought how to do it? If I do heavy computing in the event flow, the whole interface hangs until the code completes.
I began to think that I would create an Object that could handle the entire calculation task, but what should I do with the status and status information at runtime. I also have several actions that can be performed, for example. different calculations requiring different data. Do I need to write an object for each action? If I separate presentation and calculation, I have to exchange data - what is the best reason for this?
Thanks and best regards
Marco
source share