public int getLabelWidth(AbstractGEFPropertySection section, Composite parent, String[] labels) { int standardLabelWidth = AbstractPropertySection.STANDARD_LABEL_WIDTH; String stringWidth = (String) maxLabelWidth.get(sectionToTab.get(section)); GC gc = new GC(parent); int indent = gc.textExtent("XXX").x; //$NON-NLS-1$ int width = gc.textExtent(stringWidth).x; if (width + indent > standardLabelWidth) { standardLabelWidth = width + indent; } else standardLabelWidth = Math.max(width + indent, standardLabelWidth); gc.dispose(); return standardLabelWidth; }