private static Insets getInnerInsets(JComponent view) {
    Border border = view.getBorder();
    if (border instanceof ViewBorder vb) {
      border = vb.myBorder;
    }
    return border == null ? null : border.getBorderInsets(view);
  }
private static Insets getInnerInsets(JComponent view)