public void removeButtons() {
    List<Component> buttons = new ArrayList<>(myButtonComponents);
    myButtonComponents.clear();
    myButtonEnableStates = null;

    for (Component button : buttons) {
      remove(button);
    }
  }
public void removeButtons()