×

Discussion Board

Results 1 to 2 of 2

Hybrid View

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

    How to append LWUIT List screen to a LWUIT Form in j2me?

    Hii

    i want to create a lwuit list screeen ,the list items are coming to my method from Rss Feed in a loop continuosly,but i am able to append 1 title from rss feed and able to display on device,after that 2,3,4,etcc...items are changing ,but finally,i am able to display 1 title and last title only,here is my code:

    //method called by the parsing thread
    public void addNews(News newsItem,Vector news) {
    String newsArray[]={newsItem.getTitle()};

    myNewsList = new List(newsArray);

    System.out.println(newsItem.getTitle());//Here i am able to display,second title after that,it is not appending adding to myNewsList
    //myNewsList.addItem(newsItem.getTitle());
    form1.addComponent(myNewsList);
    form1.show();

    }
    Can you help?

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

    Re: How to append LWUIT List screen to a LWUIT Form in j2me?

    i got an answer for this

    here the code:
    public void disp() {
    for(int i=0;i<newsVector.size();i++){

    newsItem=(News)newsVector.elementAt(i);

    myNewsList.addItem(newsItem.getTitle().toString());
    System.out.println(newsItem.getTitle());
    }
    try{

    form1.addComponent(myNewsList);

    form1.addCommand(cmdDetails);
    form1.setScrollable(true);
    form1.setTransitionInAnimator(Transition3D.createRotation(250, true));

    form1.show();
    }
    catch(Exception e){
    e.printStackTrace();
    }








    Quote Originally Posted by pavanragi View Post
    Hii

    i want to create a lwuit list screeen ,the list items are coming to my method from Rss Feed in a loop continuosly,but i am able to append 1 title from rss feed and able to display on device,after that 2,3,4,etcc...items are changing ,but finally,i am able to display 1 title and last title only,here is my code:

    //method called by the parsing thread
    public void addNews(News newsItem,Vector news) {
    String newsArray[]={newsItem.getTitle()};

    myNewsList = new List(newsArray);

    System.out.println(newsItem.getTitle());//Here i am able to display,second title after that,it is not appending adding to myNewsList
    //myNewsList.addItem(newsItem.getTitle());
    form1.addComponent(myNewsList);
    form1.show();

    }
    Can you help?

Similar Threads

  1. error with LWUIT com.sun.lwuit.impl.midp.CanvasImplementation
    By aymen.ka in forum Mobile Java General
    Replies: 2
    Last Post: 2011-10-27, 11:41
  2. pass Text field value from one form to another form in LWUIT.
    By debasish_cse05 in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2011-01-13, 11:21
  3. problem in back and forth of LWUIT form and normal form in j2me
    By jugal.inani in forum Mobile Java General
    Replies: 8
    Last Post: 2010-06-09, 12:24
  4. J2ME, LWUIT (V. 1.2) - Menu bar from bottom to the right of the screen!
    By giuseppe.atzeni in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2009-11-12, 07: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
  •  
×