@@ -22,6 +22,10 @@ public class ReplaceChildrenController<T, V> implements BiConsumer<Container, T>
if (parent.getComponents().length == children.size()) {
return;
}
+ // Make sure that our components disappear correctly
+ for (final Component comp : parent.getComponents()) {
+ comp.setVisible(false);
+ }
parent.removeAll();
children.stream().map(makeView).forEach(parent::add);