1

I'm Using LWUIT

I have amount text field and when I click it it brings VKB and display it, then I enter my value and I have added dataChanged to this text field and what I want to do is to disable dataChanged until I finish editing in the text field

How to know if the keyboard is displayed or not, please I need an urgent help

Thanks in Advance

Amira Elsayed Ismail
  • 9,216
  • 30
  • 92
  • 175

1 Answers1

0

Instead of dataChanged(), use ActionListener. Add action listener to the text field. Then, write the code with in action listener to execute the action to be performed after click ok.

textFieldObj.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent ae) {
           // Your code
       }
});

It will work for your requirement.

Kalai Selvan Ravi
  • 2,846
  • 2
  • 16
  • 28
  • Thank you Kalai for your reply, but please could you please tell me how can I get the action of OK button in the VKB to make sure that user has finished editing ? please I'm waiting your response – Amira Elsayed Ismail Sep 12 '12 at 03:55
  • That's what I have told. If we add action listener to the textfield, it will work as OK button event in VKB. – Kalai Selvan Ravi Sep 12 '12 at 04:35