title: How to store data in a TitleAreaDialog pressing OK button?
body: <p>Why in the following code (part of a class that <code>extends TitleAreaDialog</code>):  </p>
  
  <pre><code>@Override  
  protected void createButtonsForButtonBar(Composite parent) {          
      super.createButtonsForButtonBar(parent);  
      this.getButton(IDialogConstants.OK_ID).addSelectionListener(new SelectionAdapter() {  
          @Override  
          public void widgetSelected(SelectionEvent e) {  
              okPressed();  
          }  
      });  
  }  
  
  @Override  
  protected void okPressed() {  
      saveInput();  
      super.okPressed();  
  }
  
  private void saveInput(){  
      firstNameSelected = firstNameCombo.getText();  
      lastNameSelected = lastNameCombo.getText();      
  }    
  </code></pre>
  
  <p>I get the following exception when I press the <code>OK</code> button:  </p>
  
  <blockquote>
    <p>org.eclipse.swt.SWTException: Widget is disposed      at
    org.eclipse.swt.SWT.error(SWT.java:4361)      at
    org.eclipse.swt.SWT.error(SWT.java:4276)      at
    org.eclipse.swt.SWT.error(SWT.java:4247)      at
    org.eclipse.swt.widgets.Widget.error(Widget.java:468)     at
    org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:340)       at
    org.eclipse.swt.widgets.Combo.getText(Combo.java:1006)  </p>
  </blockquote>
  
  <p>In line: <code>firstNameSelected = firstNameCombo.getText();</code> of <code>saveInput</code>?<br>
  Why is the widget disposed on selection?  </p>