final String[] data = {"A", "B","C","D"};
ObjectChoiceField ocf = new ObjectChoiceField("Set your status", data);
ocf.setChangeListener(new FieldChangeListener(){
public void fieldChanged(Field field, int context) {
if(context != PROGRAMMATIC)
Dialog.alert(data[ocf.getSelectedIndex()]);
}
});