I want to display among other things a Label
containing an Image , the image in this Label is a Timeline
:
In fact I got the image from the web : it is an animated gif , so when I added it into the Resource Editor then it was automatically converted into Timeline
. Then I added the Label
into my Form
:
public class Login extends Ecran implements ActionListener {
...
public Login(SmartPhoneBanking c, Form prevForm) {
...
patientez = new Label((MenuPrincipalForm.r).getImage("roller_fond_blanc")); // r is the LWUIT Resources , you can see the roller_fond_blanc Timeline in the attached image
patientez.setAlignment(Label.CENTER);
...
cPatienter.addComponent(patientez);
...
}
...
public void actionPerformed(ActionEvent evt)
{
...
if (evt.getSource() == validerBtn)
{
getTitleComponent().setVisible(false);
cntnr.removeComponent(cBtn);
cntnr.removeComponent(libAndFieldContainer);
removeCommand(listeMenu);
cntnr.addComponent(cPatienter); // showing the "Please wait" labels and the Timeline
repaint();
Display.getInstance().callSerially(new Runnable()
{
public void run() {
download();
}
});
}
}
I included the repaint()
method because without it the "please wait" labels are not shown.
So why isn't the Timeline
animated ?