I don't know about other GUI libraries, but the Swing library uses one thread, the Event Dispatch Thread (EDT) to do all GUI painting and user interaction (capturing button presses, mouse clicks, etc...). If an app tries to query a database with thousands of entries on the EDT, the GUI will come to a grinding halt and will become completely unresponsive, and for that reason, most Swing code would do database queries, and indeed all business logic off the EDT and in a background thread.
But having said this, you don't want the user twiddling their thumbs looking at a non-frozen GUI, but still one that doesn't display any information until the database operations are complete. So one solution that the person above suggested was to do a quick initial query on the EDT, display the results of this, and then do a large background task off of the EDT in a background thread.
If coding in Swing, another way to solve this is to use a SwingWorker object and publish interim results to the EDT via the publish and process methods.
If I'm confusing you even more, sorry, but please read this:
Concurrency in Swing