code: public static int getButtonWidthHint(Button button) {
  		button.setFont(JFaceResources.getDialogFont());
  		PixelConverter converter= new PixelConverter(button);
  		int widthHint= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
  		return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
  	}
docs: Returns a width hint for a button control.
  @param button the button
  @return the width hint