pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukáš Macháček <cg...@coolmail.cz>
Subject Re: Thread issue
Date Mon, 12 Mar 2012 17:46:48 GMT
Hi Brendan,

It's not good approach to modify GUI from Task thread.
I was facing this issue too. You can look here: 
http://mail-archives.apache.org/mod_mbox/pivot-user/201201.mbox/browser
You can use TaskAdapter or ApplicationContext.queueCallback() to 
modify/work with GUI, for example to show loaded data somewhere ;-)

Lukas

Dne 12.3.2012 18:07, Brendan cheng napsal(a):
> Hi,
>
> I followed the example of background task and built a dialog with a 
> Get task to fetch data.  The task can be ran successfully once and 
> when run the second, it failed with error message:
>
> java.lang.IllegalStateException: this method can only be called from 
> the AWT event dispatch thread, and not from "Thread-11"
>
>
> I checked with debugger and confirm that the second is still in 
> AWT-EventQueue-0, same as the first.
>
>
> The dialog box was initialized from BXML file and called by a context 
> menu item.
>
>
> Any idea what's wrong?
>
>
> Regards,
>
>
> Brendan
>


Mime
View raw message