0

I am trying to update a existing component in this below code snippet, where "index" is index of existing component.

    TextField l = new TextField();
    l.setText(txt);
    t.addComponent(index, l);

From the above, new component is being added at the end instead of updating to that indexed component. How we can achieve updating the existing component ?

1 Answers1

0

Remove the old component then add the new component or use Container.replace().

Shai Almog
  • 51,749
  • 5
  • 35
  • 65