List in J2ME

N

Natasha

Hi All,

Is it possible to have keyPressed() in J2ME List? Is commandAction() is
the only Listener method?
 
D

Darryl L. Pierce

Natasha said:
Is it possible to have keyPressed() in J2ME List?

No. keyPressed() is a method of javax.microedition.lcdui.Canvas.
javax.microedition.lcdui.List does *not* extend Canvas in the
specification, so how could it provide Canvas's methods?
Is commandAction() is
the only Listener method?

commandAction is the only method invoked by a Displayable object when a
Command has been fired, yes.

--
Darryl L. Pierce <[email protected]>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***
 
N

Natasha

Thanks for the reply.... My problem is that when the user presses the
Last item of the List and still presses the down arrow, the first item
has to be selected? I s there any solution?
 
P

Paul Hamaker

This behavior is up to the device, only way I can think of is mimicking
a list on a Canvas, but whether that's worth the effort ?
 
D

Darryl L. Pierce

Natasha said:
Thanks for the reply.... My problem is that when the user presses the
Last item of the List and still presses the down arrow, the first item
has to be selected? I s there any solution?

Not really, no. Why is circumnavigating the list a problem?

--
Darryl L. Pierce <[email protected]>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top