That's right. And if some method was defined as a non-blocking method,
then it would return immediately (with no actual result of it's work)
allowing your app to continue. Of course, you would have to check for
the result later (with some other method).
Actually, it's quite a common pattern to register some kind of callback
to be invoked automatically when the result is ready.
SwingWorker is a good example. It lets you turn a blocking operation
(such as I/O) into a non-blocking one suitable for calling from the Swing
event dispatch thread (EDT).
So if you have "readHugeFile();" in an action listener the EDT waits for
this (presumably blocking) IO operation and the UI becomes unresponsive.
But you can make a SwingWorker that implements its work method to call
readHugeFile() and store the resulting data structure in some instance
variable of your SwingWorker subclass and invoke the SwingWorker on the
EDT. The file is then loaded in some other thread. After that, the
SwingWorker's done() method is called on the EDT. You can implement the
done() method to do something, like display the data structure from the
ivar in a window.
Indeed this is how you would implement the File Open command in a multi-
document editor implemented with Swing where documents are often very
large objects. The Open command would produce a file selection dialog and
okaying rather than canceling this would trigger a SwingWorker to load
the document off the EDT whose done() method would spawn a new JFrame (or
JInternalFrame) to display the newly-opened document. While you were
waiting for your document to open though you could work on some other
open document or poke around in the Preferences or something.
(The remaining UI issue raised is the possibility that the newly opened
window will steal input focus while the user is working on something
else. If documents open quickly, you may just want to load them on the
EDT; if they sometimes load very slowly, though, it's best to let the
user keep working on others meanwhile, and then it's necessary to deal
with the possible focus swipe issue.)