我想显示Label
包含 Image 的 a ,此 Label 中的图像是 a Timeline
:
事实上,我是从网上得到的图像:它是一个动画 gif,所以当我将它添加到资源编辑器中时,它会自动转换为Timeline
. 然后我添加Label
到我的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();
}
});
}
}
我包含了该repaint()
方法,因为没有它,“请稍候”标签不会显示。
那么为什么没有Timeline
动画呢?