code: public void setVisiblePanels(List<AbstractPanel> panels) {
          hideAllTabs();
  
          for (Component component : fullTabList) {
              if (panels.contains(component)) {
                  setVisible(component, true);
              } else if (component instanceof AbstractPanel) {
                  AbstractPanel ap = (AbstractPanel) component;
                  if (!canHidePanel(ap)) {
                      setVisible(component, true);
                  } else {
                      ap.setParent(this);
                  }
              }
          }
  
          if (getSelectedComponent() == null && getTabCount() > 0) {
              setSelectedIndex(0);
          }
      }
docs: Sets the given {@code panels} as visible, while hiding the remaining panels.
  <p>
  Any panel that cannot be hidden (per {@link AbstractPanel#isHideable()} and {@link AbstractPanel#isPinned()}) will still
  be shown, even if the panel was not in the given {@code panels}, moreover {@code panels} that are not currently added to
  this tabbed panel are ignored.
  
  @param panels the panels that should be visible
  @since 2.5.0
  @see #getVisiblePanels()
  @see #hideAllTabs()