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.

Button with Spin

Button with Foxtrot

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.

Schlagwörter: ,

Trackbacks / Pingbacks

  1. Freezing the user interface - Mai, 2 2008

Schreibe einen Kommentar

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s

%d Bloggern gefällt das: