private static Dimension getPreferredSizeWithoutScrollBars(@NotNull JComponent view) {
    Dimension size = view.getPreferredSize();
    if (size == null) return new Dimension();
    JBInsets.removeFrom(size, getViewInsets(view));
    return size;
  }
private static Dimension getPreferredSizeWithoutScrollBars(@NotNull JComponent view)