0

Hai Friends,
Iam doing project in J2ME,
in MIDlet Form i append three textfields , one CustomItem control, how to setfocus(to set focus in second textfield when starting project) and to get focus(Currently Selection in which control).
i doknow hot to get focus. please help me for this problem.

3
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by ganeshharidas
0

As far I know this is not possible through use of Form at the present state (maybe new release of SDK 3.0 will give as more options). Only open option is Canvas and re-draw and recreate whole functionality. Question, is it worth it?

PS: Maybe this is possible with LWUIT, but not sure as this is also another add on coming with new SDK

0

hai, i tried with new sdk3.0 , but it doesnot supporting cldc 1.0

0

hai friends , i used display.setCurrent(textfield), its working for set focus

0

Nice one, I was not aware of setCurrent(Item item) method only setCurrent(Displayable nextDisplayable) . However reading API it says "Requests that the Displayable that contains this Item be made current, scrolls the Displayable so that this Item is visible, and possibly assigns the focus to this Item."
It more or less may work on some mobile devices and others can ignore this completely. Did you try to run your MIDlet on real device, to see if it does work? WTK emulator and real device are like two different universes...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.