Java SWT: How to trigger ModifyListener through source code?

Posted by Obay on Stack Overflow See other posts from Stack Overflow or by Obay
Published on 2010-06-08T22:36:28Z Indexed on 2010/06/08 22:42 UTC
Read the original article Hit count: 274

Filed under:
|

I have attached a ModifyListener to a Combo box and it works fine. But how do I trigger it through source code? Is there a better way than this?:

int selected = myCombo.getSelectionIndex();
myCombo.select(selected + 1);
myCombo.select(selected);

© Stack Overflow or respective owner

Related posts about java

Related posts about swt