Rectangle () { Rectangle b = myOwner.getBounds(); Insets insets = ObjectUtils.notNull(myOwner.getInsets(), JBInsets.emptyInsets()); Insets margin = ObjectUtils.notNull(myOwner.getMargin(), JBInsets.emptyInsets()); Insets ipad = getComponent().getIpad(); int left = insets.left + margin.left - ipad.left; int right = insets.right + margin.right - ipad.right; int top = insets.top + margin.top - ipad.top; int bottom = insets.bottom + margin.bottom - ipad.bottom; return new Rectangle(left, top, b.width - left - right, b.height - top - bottom); }