private Button createPushButton(Composite parent,String key,String keyOverride){
  Button button=new Button(parent,SWT.PUSH);
  button.setText(key != null ? JFaceResources.getString(key) : keyOverride);
  button.setFont(parent.getFont());
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  int widthHint=convertHorizontalDLUsToPixels(button,IDialogConstants.BUTTON_WIDTH);
  data.widthHint=Math.max(widthHint,button.computeSize(SWT.DEFAULT,SWT.DEFAULT,true).x);
  button.setLayoutData(data);
  button.addSelectionListener(getSelectionListener());
  return button;
}

private Button createPushButton ( Composite parent , String key , String keyOverride ) { Button button = new Button ( parent , SWT . PUSH ) ; button . setText ( key != null ? JFaceResources . getString ( key ) : keyOverride ) ; button . setFont ( parent . getFont ( ) ) ; GridData data = new GridData ( GridData . FILL_HORIZONTAL ) ; int widthHint = convertHorizontalDLUsToPixels ( button , IDialogConstants . BUTTON_WIDTH ) ; data . widthHint = Math . max ( widthHint , button . computeSize ( SWT . DEFAULT , SWT . DEFAULT , true ) . x ) ; button . setLayoutData ( data ) ; button . addSelectionListener ( getSelectionListener ( ) ) ; return button ; }
helper method to create a push button .
