In J2ME, is there any method or property which similar to gotFucus() & lostFocus() ?
In my J2ME app, i want to add a play command when got focus on choicegroup control named as tones & after lost focus on choicegroup control the command should be remove. How should I done this.... any idea, any hint or code is welcome....
Re: In J2ME, is there any method or property which similar to gotFucus() & lostFocus
You can simply add a focus listener on choicegroup , and handle your funtionality in focusgained() and focuslost() methods of focus listener...
Re: In J2ME, is there any method or property which similar to gotFucus() & lostFocus
[QUOTE=Rahul More;908895]In my J2ME app, i want to add a play command when got focus on choicegroup control named as tones & after lost focus on choicegroup control the command should be remove. How should I done this.... any idea, any hint or code is welcome....[/QUOTE]
If you are developing your application using the high level ui , then there are no methods to determine as such the choicegroup is fouccesd or not .
In this case you can have a default command set to the choicegroup such that the command will be added to the softkeys whenever
the choice group is foccussed
//
choiceGroup.setDefaultCommand(someCommand);
//
try out this it will solve your problem
Re: In J2ME, is there any method or property which similar to gotFucus() & lostFocus
Try using some UI toolkit like LWUIT - then you can do it with their choicegroup - by capturing the focus movement from 1 item to another....