Keeping the GUI responsive while the application does some CPU-heavy processing is one of the challenges of effective GUI programming.
Here\'s a good discussion of h
Threads or processes depending on the application. Sometimes it's actually best to have the GUI be it's own program and just send asynchronous calls to other programs when it has work to do. You'll still end up having multiple threads in the GUI to monitor for results, but it can simplify things if the work being done is complex and not directly connected to the GUI.