final Composite comp = new Composite(parent, SWT.NONE);
comp = new Composite(parent, SWT.NONE);
  private Composite createBrowserPage(Composite parent) {    final Composite comp = new Composite(parent, SWT.NONE);    GridLayout layout = new GridLayout(1, false);    comp.setLayout(layout);    new Label(comp, SWT.NONE).setText(getResourceString("SettingDialog.Label.Browser"));     class BrowserButton {      String description; // Button label      String command;     // Command it generates      String tooltip;     // Tooltip for this option      Button button;          public BrowserButton(String d, String c, String t) {        description = d;        command = c;        tooltip = t;        button = new Button(comp, SWT.RADIO);        button.setText(description);        button.setToolTipText(t);      }      public void addSelectionListener(SelectionListener s) {        button.addSelectionListener(s);      }      public Button getButton() {        return button;      }          public String getCommand() {        return command;      }          public boolean isCommand(String s) {        return command.equals(s);      }    }    browsers = new BrowserButton[]{       new BrowserButton("Mozilla/Firebird (Linux/UNIX)",                         "mozilla -remote openURL(%u,new-window)",                         getResourceString("SettingDialog.Button.Browser.Tooltip.Mozilla")),        new BrowserButton("Konqueror (Linux/UNIX)","kfmclient exec",  //$NON-NLS-2$                        getResourceString("SettingDialog.Button.Browser.Tooltip.Konqueror")),        new BrowserButton(getResourceString("SettingDialog.Button.Browser.WindowsDefault"),                         "rundll32 url.dll,FileProtocolHandler",                         getResourceString("SettingDialog.Button.Browser.Tooltip.WindowsDefault")),      new BrowserButton(getResourceString("SettingDialog.Button.Browser.MacOSXDefault"),                         "open",                         getResourceString("SettingDialog.Button.Browser.Tooltip.MacOSXDefault")),    };     browserSpecified = new Button(comp, SWT.RADIO);    browserText = new Text(comp, SWT.NONE);    browseButton = new Button(comp, SWT.NONE);    class DoBrowser implements SelectionListener {      public void widgetSelected(SelectionEvent e) {        for (int i=0; i<browsers.length; i++) {          System.out.println("Selection "+i+"=");          if (browsers[i].getButton().getSelection()) {            browserText.setText(browsers[i].getCommand());          }        }        if (browserSpecified.getSelection()) {          browserText.setEnabled(true);          browseButton.setEnabled(true);        } else {          browserText.setEnabled(false);          browseButton.setEnabled(false);        }              }          public void widgetDefaultSelected(SelectionEvent e) { }    }    SelectionListener sel = new DoBrowser();    // Set the default radio button, based on the browser text. Whilst    // doing this, we can se the selction listener.    boolean selected = false;    for (int i=0;i<browsers.length;i++) {      browsers[i].addSelectionListener(sel);      if (browsers[i].getCommand().equals(browser) && !selected) {        browsers[i].getButton().setSelection(true);        selected = true;      }    }    if (!selected) {      browserSpecified.setSelection(true);      browserText.setEnabled(true);      browseButton.setEnabled(true);    } else {      browserText.setEnabled(false);      browseButton.setEnabled(false);    }    browserSpecified.setText(getResourceString("SettingDialog.Button.Browser.UserSpecified"));     browserSpecified.setToolTipText(getResourceString("SettingDialog.Button.Browser.ToolTip.UserSpecified"));     browserSpecified.addSelectionListener(sel);    browserText.setText(browser);    browserText.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));    browserText.addModifyListener(new ModifyListener(){        public void modifyText(ModifyEvent e) {          browser = browserText.getText();        }      });        browseButton.setText(getResourceString("SettingDialog.Button.Browse"));         browseButton.addSelectionListener(new SelectionAdapter(){        public void widgetSelected(SelectionEvent e){          FileDialog fd = new FileDialog(dialog.getShell(), SWT.OPEN);          fd.setText(getResourceString("SettingDialog.FileDialog.Text"));           fd.open();          if (!fd.getFileName().equals("")) {             browserText.setText(fd.getFilterPath() + "/" + fd.getFileName());             browser = browserText.getText();          }        }      });            return comp;  }