private void stretchContentToOwnerIfNecessary(@NotNull Component owner) {
    if (myForcedSize != null) return;
    if (!myStretchToOwnerWidth && !myStretchToOwnerHeight) return;

    Dimension filledSize = myContent.getPreferredSize();
    if (myStretchToOwnerWidth) filledSize.width = owner.getWidth();
    if (myStretchToOwnerHeight) filledSize.height = owner.getHeight();

    myContent.setPreferredSize(filledSize);
  }
private void stretchContentToOwnerIfNecessary(@NotNull Component owner)