0

I have used this code for combine textFiled.PASSWORD with TextField.NUMERIC

txtpwd.setConstraint(TextField.PASSWORD | TextField.NUMERIC);

When I run in Emulator i can type string .but i just typed NUMERIC .

I go to this link and find to combine constraints !!!

How to combine constraints

Mun0n
  • 4,438
  • 4
  • 28
  • 46
amin
  • 289
  • 4
  • 17

1 Answers1

0

First of all. The link that you have put is a lcdui API, be carefull about it.

This is the TextField API that you need

http://lwuit.java.net/javadocs/com/sun/lwuit/TextField.html

Ok, seeing this http://lwuit.java.net/javadocs/com/sun/lwuit/TextArea.html#setConstraint(int)

I think that you must use this line:

textField.setConstraint(TextField.NUMERIC | TextField.PASSWORD);

just the opposite.

Mun0n
  • 4,438
  • 4
  • 28
  • 46