The proper way to handle exceptions thrown by the SwingWorker.doInBackground
问题 The proper way to handle exceptions thrown by the doInBackground method of SwingWorker class is to invoke the get method from within the done method, as explained here and here. The documentation for the get method states the following: Waits if necessary for the computation to complete, and then retrieves its result. Note: calling get on the Event Dispatch Thread blocks all events, including repaints, from being processed until this SwingWorker is complete. Therefore, if the get method