I used the following code to hide password in textfield.
TextField passwordTextField = new TextField("", "PASSWORD", 20, TextField.PASSWORD);
What happens in device is that when I start entering the password, only black dot is shown. A letter should be shown while typing and when other letter is typed, the former letter should be hidden(black dot). But only black dot is seen. The same code works in iOS though.