private void setBounds(@Nullable Point location, @Nullable Dimension size) {
    if (size != null) size.height += getAdComponentHeight();
    if (myPopup == null) {
      // store bounds to show popup later
      if (location != null) myForcedLocation = location;
      if (size != null) myForcedSize = size;
    }
    else {
      MyContentPanel content = myContent;
      if (content == null) return;
      Window window = getContentWindow(content);
      if (window == null) return;
      Insets insets = content.getInsets();
      if (location == null) {
        location = window.getLocation(); // use current window location
      }
      else {
        fixLocateByContent(location, false);
        if (insets != null) {
          location.x -= insets.left;
          location.y -= insets.top;
        }
      }
      if (size == null) {
        size = window.getSize(); // use current window size
      }
      else {
        JBInsets.addTo(size, insets);
        if (LOG.isDebugEnabled()) {
          LOG.debug("Update content preferred size: width = " + size.width + " height = " + size.height);
        }
        content.setPreferredSize(size);
        size = window.getPreferredSize();
      }

      if (LOG.isDebugEnabled()) {
        LOG.debug("SetBounds x = " + location.x + " y = " + location.y + " width = " + size.width + " height = " + size.height);
      }
      window.setBounds(location.x, location.y, size.width, size.height);
      window.setCursor(Cursor.getDefaultCursor());
      updateMaskAndAlpha(window);
    }
  }
private void setBounds(@Nullable Point location, @Nullable Dimension size)