The best way to do animations in a widget is to leverage jquery or prototype/scriptaculous in the widget ftl. Both should automatically be available and included in the page, and provide a number of possible animations.
Thanks for the info.
I was wondering if you could provide an example on how to handle the "animation".
I guess right now what I am trying to accomplish is to change the value of a text within a specific amount of time. But I would need to call that code behind written in java. I deally I would have to reload that widget after a specific amount of time without reloading the whole page.