Aligning the text on an SWT button

Main.java:

import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Shell;
 
public class Main {
   public static void main(String[] args) {
      Display display = new Display();
      Shell shell = new Shell(display);
 
      // pos x, pos y, width, height
      shell.setBounds(200, 200, 400, 200);
      shell.setText("SWT Button Alignment Demonstration");
      shell.setLayout(new GridLayout());
 
      Group buttonGroup = new Group(shell, SWT.NONE);
      GridLayout gridLayout = new GridLayout();
      gridLayout.numColumns = 3;
      buttonGroup.setLayout(gridLayout);
      buttonGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
      SelectionListener selectionListener = new SelectionAdapter () {
         public void widgetSelected(SelectionEvent event) {
            Button button = ((Button) event.widget);
            System.out.print(button.getText());
            System.out.println(" selected = " + button.getSelection());
         };
      };
       
      Button button1 = new Button(buttonGroup, SWT.PUSH);
      button1.setText("left");
      sizeControl(button1, 100, 30);   
      button1.setAlignment(SWT.LEFT);   
      button1.addSelectionListener(selectionListener);
       
      Button button2 = new Button(buttonGroup, SWT.PUSH);
      button2.setText("center");
      sizeControl(button2, 100, 30);
      button2.setAlignment(SWT.CENTER);
      button2.addSelectionListener(selectionListener);
 
      Button button3 = new Button(buttonGroup, SWT.PUSH);
      button3.setText("right");
      sizeControl(button3, 100, 30);
      button3.setAlignment(SWT.RIGHT);
      button3.addSelectionListener(selectionListener);
       
      shell.open();
 
      while (!shell.isDisposed()) {
         if (!display.readAndDispatch()) {
            display.sleep();
         }
      }
      display.dispose();
   }
    
   public static void sizeControl(Control control, int width, int height) {
      GridData gridData = new GridData();   
      gridData.widthHint = width;
      gridData.heightHint = height;
      control.setLayoutData(gridData);
   }
}