我有一个表单中的 TextField:
private TextField cc1F = new TextField("", "", 250, TextField.ANY);
单击 OK 按钮后,将 cc1F 字段的约束设置为:
cc1F.setConstraints(TextField.UNEDITABLE);
然后我得到一个例外:
java.lang.NullPointerException
at com.sun.midp.lcdui.DefaultInputMethodHandler.setConstraints(+63)
at javax.microedition.lcdui.TextField$InputMethodClientImpl.setConstraints(+20)
at javax.microedition.lcdui.TextField.setConstraints(+37)
at com.zousys.j2me.zmail.gui.view.HeaderView.menuAction(+146)
.....................................
有人知道吗?