GC gc = new GC(Display.getDefault()); org.eclipse.swt.graphics.Point size = gc.stringExtent("TableHeader"); gc.dispose();