Source:
private void createImportButtons(Composite composite) { Composite buttonContainer = new Composite(composite, SWT.NULL); buttonContainer.setLayout(new GridLayout()); buttonContainer.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false)); fImportButton = new Button(buttonContainer, SWT.PUSH); fImportButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); fImportButton.setText(Messages.ManageXMLAnalysisDialog_Import); fImportButton.addSelectionListener(new SelectionListener() { @Override public void widgetDefaultSelected(SelectionEvent e) { } @Override public void widgetSelected(SelectionEvent e) { importAnalysis(); } }); fExportButton = new Button(buttonContainer, SWT.PUSH); fExportButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); fExportButton.setText(Messages.ManageXMLAnalysisDialog_Export); fExportButton.addSelectionListener(new SelectionListener() { @Override public void widgetDefaultSelected(SelectionEvent e) { } @Override public void widgetSelected(SelectionEvent e) { exportAnalysis(); } }); fEditButton = new Button(buttonContainer, SWT.PUSH); fEditButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); fEditButton.setText(Messages.ManageXMLAnalysisDialog_Edit); fEditButton.addSelectionListener(new SelectionListener() { @Override public void widgetDefaultSelected(SelectionEvent e) { } @Override public void widgetSelected(SelectionEvent e) { editAnalysis(); } }); fDeleteButton = new Button(buttonContainer, SWT.PUSH); fDeleteButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); fDeleteButton.setText(Messages.ManageXMLAnalysisDialog_Delete); fDeleteButton.addSelectionListener(new SelectionListener() { @Override public void widgetDefaultSelected(SelectionEvent e) { } @Override public void widgetSelected(SelectionEvent e) { deleteAnalysis(); } }); setButtonsEnabled(false); }

Target:
private void createImportButtons(Composite composite) { Composite buttonContainer = new Composite(composite, SWT.NULL); buttonContainer.setLayout(new GridLayout()); buttonContainer.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false)); Button importButton = new Button(buttonContainer, SWT.PUSH); importButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); importButton.setText(Messages.ManageXMLAnalysisDialog_Import); importButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { importAnalysis(); } }); fExportButton = new Button(buttonContainer, SWT.PUSH); fExportButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); fExportButton.setText(Messages.ManageXMLAnalysisDialog_Export); fExportButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { exportAnalysis(); } }); fEditButton = new Button(buttonContainer, SWT.PUSH); fEditButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); fEditButton.setText(Messages.ManageXMLAnalysisDialog_Edit); fEditButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { editAnalysis(); } }); fDeleteButton = new Button(buttonContainer, SWT.PUSH); fDeleteButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); fDeleteButton.setText(Messages.ManageXMLAnalysisDialog_Delete); fDeleteButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { deleteAnalysis(); } }); setButtonsEnabled(false); }