Are you actually using a Task or are you using your own Thread-based class? If
you are using Task, TaskAdapter should do it. Otherwise, you can use
queueCallback() as Chris describes below. It is similar to
SwingUtilities.invokeLater(), if you are familiar with that.
On Aug 11, 2010, at 6:09 AM, Chris Bartlett wrote:
> Lucien,
>
> I'm not sure if the databinding aspect changes things, but I think this is
> what ApplicationContext.queueCallback(Runnable) is for.
>
> ApplicationContext.queueCallback(new Runnable() {
> @Override
> public void run() {
> statusLabel.setText(status);
> }
> });
>
>
> Here are some old mailing list messages which reference that method.
>
> http://mail-archives.apache.org/mod_mbox/pivot-user/201002.mbox/%[email protected]%3e
>
> http://www.google.com/search?hl=en&client=opera&rls=en&q=queueCallback+site%3Ahttp%3A%2F%2Fmail-archives.apache.org%2Fmod_mbox%2Fpivot+-%22svn+commit%22&aq=f&oq=&aqi=
>
> Regards,
>
> Chris
>
> On 11 August 2010 16:17, Pfeffer, Lucien <[email protected]> wrote:
> I have a thread with an endless loop collecting data from ethernet and set it
> into “Text” property of Labels on a Frame using Databinding.
>
> The Problem is that the text (Label) is only repainted if the mouse is moved
> over the window. I tried using the repaint method with no success.
>
> I also tried using a Task with an TaskListener wrapped in a TaskAdapter. But
> this also didn`t work, it is furthermore only repainted on mouse movement.
>
>
> Is there any possibility to force the repaint of the Label(s)?
>
>
> Regards
>
>
> Lucien Pfeffer
>
>
>