1

I wish to save information entered by user on my form using a dialogue box.

Dialog d=new.dialog(); d.show("save info","Do you want to save?","OK","Cancel");

Can i add a textfield (edit-textbox) in the dialog box for the user to enter the desired name (alphanumeric) before pressing ok. and if not interested he can simply cancel. I will be saving the information as a hashtable in an object with user selected name.

If it cannot be done in dialog what is the next best way. pl add a piece of code or tutorial for better understanding.

Its a mobile app developed in Codename one. Therefore, even LWUIT users can help.

thanks

1 Answers1

1

try this:

Textfield myTF = new textfield();

Dialog abc = new Dialog();//how ever u wish to initialize it

abc.addComponenet(myTF);//add text field to dialog
abc.show();//show dialog.

Note: Dialog extends a Form. so u get the propertied of a form in your dialog.

Nikhil
  • 1,279
  • 2
  • 23
  • 43