×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Dec 2012
    Location
    Mumbai, Maharashtra, India
    Posts
    79

    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....
    Last edited by Rahul More; 2013-01-06 at 17:58.

  2. #2
    Registered User
    Join Date
    May 2012
    Location
    Hyderabad,AP,India.
    Posts
    62

    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...
    Regards,
    Harsha

  3. #3
    Registered User
    Join Date
    Sep 2012
    Posts
    31

    Re: In J2ME, is there any method or property which similar to gotFucus() & lostFocus

    Quote Originally Posted by Rahul More View Post
    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....
    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
    Regards,
    Venkatesh

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    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....
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Add application property using build.xml in J2ME polish
    By tharindufit in forum Mobile Java General
    Replies: 1
    Last Post: 2009-06-04, 08:23
  2. Replies: 4
    Last Post: 2009-05-09, 13:14
  3. How to handle LostFocus event for TextField in J2ME?
    By anupdesai1248 in forum Mobile Java General
    Replies: 4
    Last Post: 2009-03-02, 18:15
  4. Anything similar swing's JOptionPane.showOptionDialog in J2ME
    By Okhovvat in forum Mobile Java General
    Replies: 1
    Last Post: 2007-04-05, 12:31
  5. 3300 did not install property file in J2me
    By cyberstar_2001 in forum Mobile Java General
    Replies: 0
    Last Post: 2003-12-11, 03:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×