title: final Combo and SelectionListener
body: <p>Hi there mighty programmers, once again as n00b beginner I am asking for your help...</p>
  
  <p>Problem is as follows, I have a child window, containing some labels, buttons and two drop down menus. I want to have a SelectionListener on one combo box, named 'name' so that selected value from this drop down will affect the selected value in the second Combo - desc.</p>
  
  <p>How to do that? </p>
  
  <p>if I uncomment </p>
  
  <pre><code>//desc.select(name.getSelectionIndex());
  </code></pre>
  
  <p>in</p>
  
  <pre><code>name.addSelectionListener(new SelectionAdapter())
  </code></pre>
  
  <p>eclipse wants me to change Combo desc and Combo name  to final, which is not possible cuz it will require initialising them outside the loop spoiling my layout :( </p>
  
  <p>Here is the code: </p>
  
  <pre><code>public void tariffAddWindow(final Shell childWindow) {
  
      childWindow.setText("add dialog");
  
      labels = new Label[operatorTariffData.getColumnNames().length];
      inputTexts = new Text[operatorTariffData.getColumnNames().length];
      final Button buttons[] = new Button[operatorTariffData.getColumnNames().length];
  
      Combo name = null;
      Combo desc = null;
  
      for (int i =1; i&lt; operatorTariffData.getColumnNames().length; i++) {
  
  
              labels[i] = new Label(childWindow, SWT.NONE);
              labels[i].setText(operatorTariffData.getColumnNames()[i].toString());
              labels[i].setBackground(blue);          
  
          if (i == 3) {
              name = new Combo(childWindow, SWT.READ_ONLY | SWT.BORDER);
              name.setLayoutData(tLayout);
              buttons[i] = new Button(childWindow, SWT.PUSH);
              buttons[i].setText("e");
          } else if (i == 4) {
              desc = new Combo(childWindow, SWT.READ_ONLY | SWT.BORDER);
              desc.setLayoutData(tLayout);
              buttons[i] = new Button(childWindow, SWT.PUSH);
              buttons[i].setText("e");
          } else {
  
              inputTexts[i] = new Text(childWindow, SWT.None);
              //texts[i].setText(data.getData()[i].toString());
              inputTexts[i].setLayoutData(tLayout);
  
              buttons[i] = new Button(childWindow, SWT.TOGGLE);
              buttons[i].setText("x");
              buttons[i].setSelection(false);
          }
      }
  
      for (int i = 1; i &lt; contentProvider.getTariffNames().getQueryRowCount(); i++) {
          name.add(contentProvider.getTariffNames().getQueryData()[i][3].toString());
          desc.add(contentProvider.getTariffNames().getQueryData()[i][2].toString());
      }
  
      name.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(SelectionEvent e) {
              //desc.select(name.getSelectionIndex());
          }
      });
  }
  </code></pre>