Freezing the user interface
Looking around for a good framework that encapsulates the user interface freeze problem in Swing I found Spin, Foxtrot and the Swing Application Framework’s Task framework. From executing the tests it seems that Spin and Foxtrot both have a problem on the Metal Look&Feel. The pressed button looks pressed as long as the mouse stays over it or doesn’t hit the boundaries and initiate a mouse entered or exited event. This mainly happens because the method blocks inside the actionPerformed until the background thread is finished. These frameworks reroute the Event-Dispatch-Thread (EDT) to a different event queue. The bug somehow doesn’t happen with the Windows Look&Feel.
With the Swing Application Framework’s Task framework this doesn’t happen because the task will be sent to an executor service which executes it and the method returns immediately. There is no EDT rerouting or blocking involved.