Setting the alignment on a Label in SWT

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.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
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, 300, 200);
      shell.setText("Label Demonstration");
      shell.setLayout(new GridLayout());
             
      final Label label = new Label(shell, SWT.BORDER | SWT.WRAP);
      label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));
      label.setText("`I quite agree with you,' said the Duchess; `and the moral " +
                    "of that is--Be what you would seem to be--or if you'd like " +
                    "it put more simply--Never imagine yourself not to be " +
                    "otherwise than what it might appear to others that what " +
                    "you were or might have been was not otherwise than what " +
                    "you had been would have appeared to them to be otherwise.'");
       
      Group buttonGroup = new Group(shell, SWT.NONE);
      GridLayout gridLayout = new GridLayout();
      gridLayout.numColumns = 1;
      buttonGroup.setLayout(gridLayout);
      buttonGroup.setLayoutData(new GridData(GridData.FILL_VERTICAL));
       
      SelectionListener selectionListener = new SelectionAdapter () {
         public void widgetSelected(SelectionEvent event) {
            Button button = ((Button) event.widget);
            if (button.getText().equals("Left")) {
               label.setAlignment(SWT.LEFT);
            }
            else if (button.getText().equals("Right")) {
               label.setAlignment(SWT.RIGHT);
            }
            else {
               label.setAlignment(SWT.CENTER);
            }
         };
      };
             
      Button leftAlign = new Button(buttonGroup, SWT.RADIO);
      leftAlign.setText("Left");
      leftAlign.addSelectionListener(selectionListener);
      Button centerAlign = new Button(buttonGroup, SWT.RADIO);
      centerAlign.setText("Center");
      centerAlign.addSelectionListener(selectionListener);
      Button rightAlign = new Button(buttonGroup, SWT.RADIO);
      rightAlign.setText("Right");
      rightAlign.addSelectionListener(selectionListener);
 
      shell.open();
 
      while (!shell.isDisposed()) {
         if (!display.readAndDispatch()) {
            display.sleep();
         }
      }
      display.dispose();
   }
}