private void syncVisibility() {
    JComponent target = getTargetComponent();
    boolean isVisible = target != this && target.isVisible();
    if (isVisible() != isVisible) {
      setVisible(isVisible);
      validate();
    }
  }
private void syncVisibility()