【发布时间】:2015-01-30 01:52:52
【问题描述】:
我已经在一个表单上实现了一个数据更改监听器,它工作得很好,但是当我尝试在一个对话框中的表单上实现它时,它似乎不起作用。可能是什么问题?这是我的代码...
protected void onMain_AddMemberAction(final Component c, ActionEvent event) {
//Show the dialog box that has the form.
final Dialog d = (Dialog)createContainer(fetchResourceFile(), "GUI 1");
d.show();
//Listen to the data change on the text field.
findPostalCode(c).addDataChangeListener(new textListener() {
public void dataChanged(int type, int index) {
//Run the following method
test(c);
}
});
}
private abstract class textListener implements DataChangedListener {
}
提前谢谢你
【问题讨论】:
标签: dialog textfield addeventlistener codenameone