SwingWorker: for SWT too!

It seems that somebody at Javalobby has realized that SWT long running tasks freeze the GUI as well.

Oh, sorry, just thought SWT didn't suffer those problems? Well, the fact is that it does. All GUI frameworks do.

Good news is that SwingWorker may help you there too. Go download the code and change SwingUtilities.invokeLater (or AWTEventQueue.invokeLater) by Display.getCurrent().asyncExec() and you're probably done.

Now, isn't it ironic that Sun's SwingWorker solves IBM's SWT threading issues? ;-)

Comentarios:

Thanks for your concern, but Eclipse 3.0 already introduced the Jobs API, which allows me to create Jobs, schedule them (background or not), join them, cancel them, get Progress reports from them,...

This is used all over the place in Eclipse to process more tasks in the background. Oh... it also comes with a simple UI Job manager, where I can view tasks and their progress OR cancel them.

So, whenever I write code for the Eclipse platform, I already have the tools necessary. Don't worry... Swing'll get there too...... some day ;-)

Enviado por murphee en agosto 16, 2005 a las 07:43 PM CEST #

Hi Murphee,

Yes, NetBeans has also one of those. I was talking of SWT, not Eclipse, actually.

Or, maybe SWT does not run without Eclipse. Is that what you mean? (I hope not, nobody would like to run NetBeans to use Swing, right?)

Cheers,
Antonio

Enviado por Antonio en agosto 17, 2005 a las 01:59 AM CEST #

Enviar un comentario:
Los comentarios han sido deshabilitados.
About

swinger

Search

Archives
« abril 2014
lunmarmiéjueviesábdom
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Hoy