animated gif icon

Hi all,

I’m newbie. Currently, I’m using Vaadin version 6.6.2, I tried to add an animated gif icon into Button but it didn’t work (it showed up but animating). I wonder if Vaadin supports animated gif icon for Button, Label and Table? Anyone has experience about that please help me.

Here is part of my code:

Resource r = uiIconBuilder.getResource();
myButton.setIcon(r);

Many thanks in advance
Jimmy

It seems like a problem with “uiIconBuilder.getResource()” or with you gif file.

I tried the following which worked perfectly fine :


Button b = new Button("test");
b.setIcon(new ThemeResource("images/anim0003-1_e0.gif"));
layout.addComponent(b);

I took the gif file from a quick google search : http://www.animatedgif.net/email/anim0003-1_e0.gif
and added it in my theme images folder.

It works now.

Thank you, Clerc.