private Insets parseInsets(String key) throws XPathExpressionException { Element elm = helper.xpathAsElement(key); int left = helper.getInt(elm, "left"); int top = helper.getInt(elm, "top"); int right = helper.getInt(elm, "right"); int bottom = helper.getInt(elm, "bottom"); Insets insets = new Insets(top, left, bottom, right); return insets; }