Can I have radio buttons and check boxes in J4ME?

1 view
Skip to first unread message

roopesh kumar

unread,
Jan 6, 2010, 5:18:02 AM1/6/10
to J4ME
Hi,
Greetings.

I'm developing a simple app which uses Choices. So I want to have
Implicit and Explicit Choices (radio buttons and Check boxes). At the
same time time, I want to respond to key presses of numeric keys. Can
this be possible using J4ME?. If yes, can you please tell me more?

I cannot use lcdui packages from j2me, since it does not support
responding to any key other than soft keys. Please help me out.

Regards,
Roopesh

Amit S

unread,
Jan 7, 2010, 8:26:57 AM1/7/10
to J4ME
hey Roopesh,

Its very well possible. Just override the method keyPressed() in the
DeviceScreen. It should do the trick.
But afaik, J4ME internally uses key presses only for navigation and
selection of widgets.

public void keyPressed (int key ) {
super.keyPressed(key);
//Your code to understand any numerical key presses !!
}


Thanks,
/A

roopesh kumar

unread,
Jan 7, 2010, 11:05:01 PM1/7/10
to j4...@googlegroups.com
Hi Amit,

Thanks for your response.

I got the trick. The documentation is really helpful.
I've one small problem. The RadioButton in j4me is not similar to ChoiceGroup(Exclusive) of j2me. Specially with respect to the display of radio buttons( thats how it got the name right) on the left side of the choices. Is there any way to get this in j4me RadioButton?

Regards,
Roopesh.

2010/1/7 Amit S <amitm...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "J4ME" group.
To post to this group, send email to j4...@googlegroups.com.
To unsubscribe from this group, send email to j4me+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/j4me?hl=en.




Reply all
Reply to author
Forward
0 new messages