Numerator
Numerator

Reputation: 1409

SelectionListener and SelectionAdapter

I can't find this interface or other information about this:

    ok.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
      System.out.println("Your name is " + text.getText());
      shell.close();
      }
      });

Thanks a lot!

Upvotes: 2

Views: 3308

Answers (1)

Mat
Mat

Reputation: 206679

SelectionAdapter is an abstract class that implements the SelectionListener interface.

It implements all the methods defined in that interface. You can use it if you only need specific code for some of them, otherwise implementing the interface directly is just as simple.

Upvotes: 5

Related Questions