[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] focuslistener and buttons don't mix?

I have a dialog that implements the focuslistener interface, and I cannot add a focuslistener to a button in the dialog. The error I get says
"The method AddFocusListener(FocusListener) in the type Control is not applicable for the arguments(NewPatientDialog).


The code is pretty straightforward:
public class NewPatientDialog extends Dialog implements SelectionListener, FocusListener {


..
m_clearFields = new Button(btnComposite, SWT.PUSH);
m_saveDefaults = new Button(btnComposite, SWT.PUSH);
m_clearFields.setText(NLSStrings.getString("clearFieldsBtnLabel"));
m_saveDefaults.setText(NLSStrings.getString("saveDefaultsBtnLabel"));
m_clearFields.addSelectionListener(this);
m_clearFields.addFocusListener(this); // unhappy here
m_saveDefaults.addSelectionListener(this);
m_saveDefaults.addFocusListener(this); // unhappy here as well


..
}

Any thoughts?

--PK