File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes getSelectedIndex() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "getSelectedIndex()" Watch "getSelectedIndex()" New topic
Author

getSelectedIndex()

Deepan Devadasan
Ranch Hand

Joined: Jan 25, 2007
Posts: 226
I have a doubt about getSelectedIndex() of List...

Does it return the value of the index only if List.SELECT_COMMAND is pressed or return the correct index value even if we traverse over an item and try to call the getSelectedIndex()with a non List.SELECT_COMMAND Command...

And also advice me on the behaviour of ITEM type Commands with List Items...


Theepan Thevathasan
SCJP 1.4, SCWCD 1.4, SCMAD 1.0 SCBCD 1.3, MCP(.Net Frm 2.0 App Dev Fdn)
shah isha
Greenhorn

Joined: May 01, 2007
Posts: 18
Hi,
I have used list and have not set select command still its giving me right selected index anytime.

Have you come to know about select_command
Let me koow if yes

Regards,
Isha
Deepan Devadasan
Ranch Hand

Joined: Jan 25, 2007
Posts: 226
yeah...

it is to capture press of Fire Button on Lists..

Thats the default...

you can change it with setDefaultSelectCommand() or something...


and when you check for press you could do this
commad==List.SELECT_COMMAND
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getSelectedIndex()