×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2012
    Location
    India
    Posts
    103

    How to work with LWUIT TABs click events

    I am developing LWUIT Tab based Rss Application, initially I want to display default tab, where I am able to display the Rss related titles and images successfully, my next requirement is, if an end user I click on second tab, I should be able to load the details regarding the second tab How to capture the click event for LWUIT Tab? Here my code which is not working:

    public class XMLMidlet extends MIDlet{
    public void startApp() {
    Display.init(this);

    Process p;
    try {
    p = new Process(this);
    p.process();

    } catch (IOException ex) {
    ex.printStackTrace();
    }

    }

    public class Process extends Form {
    public void keyReleased(int keyCode) {
    System.out.println("str");

    Component p=this.getFocused();
    String str= p.getClass().getName();
    if(str.toLowerCase().indexOf("radiobutton")!=-1){
    process();
    }

  2. #2
    Nokia Developer Expert
    Join Date
    May 2012
    Posts
    224

    Re: How to work with LWUIT TABs click events

    addTabsFocusListener() might help you, but in full touch devices may not work.

    Tabs tp = new Tabs();
    tp.addTabsFocusListener(new FocusListener(){

    public void focusGained(Component arg0) {
    System.out.println("Tab Focus listener "+arg0);

    }

    public void focusLost(Component arg0) {


    }

    });

  3. #3
    Registered User
    Join Date
    Jul 2012
    Location
    India
    Posts
    103

    Re: How to work with LWUIT TABs click events

    hi,
    can you tell me what should i place in focusLost() method?

  4. #4
    Nokia Developer Expert
    Join Date
    May 2012
    Posts
    224

    Re: How to work with LWUIT TABs click events

    just keep it as empty if you are not doing any thing while loosing the focus.

Similar Threads

  1. LWUIT NUMBER OF TABS
    By pavanragi in forum Mobile Java General
    Replies: 1
    Last Post: 2012-08-22, 08:56
  2. LWUIT Tabs creation
    By pavanragi in forum Mobile Java General
    Replies: 4
    Last Post: 2012-08-18, 08:09
  3. How to display a Form Screen on LWUIT Tabs?
    By pavanragi in forum Mobile Java General
    Replies: 3
    Last Post: 2012-08-09, 09:42
  4. LWUIT: tabs - how to mark the currently selected tab?
    By azakharo in forum Mobile Java General
    Replies: 3
    Last Post: 2011-12-09, 08:54
  5. Nokia 5230 Browser can not click on some links or tabs in website.
    By pak_amar in forum General Development Questions
    Replies: 1
    Last Post: 2010-03-14, 15:16

Posting Permissions

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