tags:

views:

26

answers:

1

i am working with j2me List.It contain many elements.I want when i select the any of them i can use it value in my required function.e.g in my code i select a number when i select it i press a command chat a text area is shown when i write some text there this i can get easily but how the selected element from list how i can get it .....

+1  A: 
<Object Of List>.getSelectedIndex();

You can maintain a Vector which have the same data as filled in List Component. Now you can get getSelectedIndex and can retrieve object from Vector from the position to get the selected Data.

org.life.java