Dimension (final Component component, final GridConstraints constraints, final boolean addIndent) { try { final Dimension size = getSize(constraints.myPreferredSize, component.getPreferredSize()); if (addIndent) { size.width += DEFAULT_INDENT * constraints.getIndent(); } return size; } catch (NullPointerException e) {//IDEA-80722 return new Dimension(0, 0); } }