Is it possible to replace an existing widget in an VerticalPanel in java GWT with another widget? I tried to do the following:
verticalPanel.remove(widget1);
verticalPanel.add(widget2);
This unfortunately adds the widget2 at the end of the verticalPanel but I would like to replace the widget1…
You want to use
VerticalPanel.remove(int index)andVerticalPanel.insert(Widget w, int beforeIndex).