private static Insets getInsets(Container container) {
    final Insets insets = container.getInsets();
    int insetsValue = getDesignTimeInsets(container);
    if (insetsValue != 0) {
      return new Insets(insets.top+insetsValue, insets.left+insetsValue,
                        insets.bottom+insetsValue, insets.right+insetsValue);
    }
    return insets;
  }
private static Insets getInsets(Container container)