Label doesn't repaint

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Label doesn't repaint

Mathias Versichele
Small new problem. In the 'taskExecuted' method of my TaskListener, I want to 'reset' the components in my statusbar:

activityIndicator.setActive(false);
activityLabel.setText("Ready");
activityLabel.repaint();
activityMeter.setPercentage(0.5);
activityMeter.repaint(); 

This works perfectly for the meter and the indicator, but not for the label (which only changes when I move or resize the window). I also tried the repaint(boolean) method to no avail.

Regards

--
Mathias Versichele
Bio-ir milieutechnologie / Msc. geografie
Oudburgstraat 16
9240 Zele
0485/16.07.08
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Label doesn't repaint

Greg Brown
Administrator
Be sure to wrap your TaskListener in a TaskAdapter. TaskListeners are called on the background thread. TaskAdapters ensure that they are called on the UI thread.

On Feb 24, 2010, at 7:18 AM, Mathias Versichele wrote:

> Small new problem. In the 'taskExecuted' method of my TaskListener, I want to 'reset' the components in my statusbar:
>
> activityIndicator.setActive(false);
> activityLabel.setText("Ready");
> activityLabel.repaint();
> activityMeter.setPercentage(0.5);
> activityMeter.repaint();
>
> This works perfectly for the meter and the indicator, but not for the label (which only changes when I move or resize the window). I also tried the repaint(boolean) method to no avail.
>
> Regards
>
> --
> Mathias Versichele
> Bio-ir milieutechnologie / Msc. geografie
> Oudburgstraat 16
> 9240 Zele
> 0485/16.07.08

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Label doesn't repaint

Mathias Versichele
Ok, that does the trick. Thanks

2010/2/24 Greg Brown <[hidden email]>
Be sure to wrap your TaskListener in a TaskAdapter. TaskListeners are called on the background thread. TaskAdapters ensure that they are called on the UI thread.

On Feb 24, 2010, at 7:18 AM, Mathias Versichele wrote:

> Small new problem. In the 'taskExecuted' method of my TaskListener, I want to 'reset' the components in my statusbar:
>
> activityIndicator.setActive(false);
> activityLabel.setText("Ready");
> activityLabel.repaint();
> activityMeter.setPercentage(0.5);
> activityMeter.repaint();
>
> This works perfectly for the meter and the indicator, but not for the label (which only changes when I move or resize the window). I also tried the repaint(boolean) method to no avail.
>
> Regards
>
> --
> Mathias Versichele
> Bio-ir milieutechnologie / Msc. geografie
> Oudburgstraat 16
> 9240 Zele
> 0485/16.07.08




--
Mathias Versichele
Bio-ir milieutechnologie / Msc. geografie
Oudburgstraat 16
9240 Zele
0485/16.07.08
Loading...