Disable TextField in J2ME
问题 Is it possible to dynamically make TextField element disabled and enabled during the run time in Java ME? 回答1: according to API documentation, setConstraints(TextField.UNEDITABLE) could do something like that: Sets the input constraints of the TextField... Note if you need to preserve contents and modifier flags, parameter passed to above method might require some tweaking, like setConstraints((getConstraints() & TextField.CONSTRAINT_MASK) | TextField.UNEDITABLE) // "disable" - set UNEDITABLE