×

Discussion Board

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

    How to Set an image to lwuit list?

    i want to set a title and an image to lwuit list from Rss feed,i am able to set title ,but i dont know how to set an image?after i set an image and title ,then i need to display it on form...
    here my code:

    public void disp() {
    //String[] items={newsItem.getTitle()};
    for(int i=0;i<news.size();i++){


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

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


    }
    try{
    System.out.println("hiii");

    form1.addComponent(myNewsList);

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

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

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

    Re: How to Set an image to lwuit list?

    Hi pavanragi,

    create class that implements listcellrenderer and extends label, and put this image you want to display in the icon field of the label.

    see the LWUIT listcellrenderer with image example application

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

    Re: How to Set an image to lwuit list?

    Hi Bandarap
    Thanks for reply....


    Quote Originally Posted by bandarap View Post
    Hi pavanragi,

    create class that implements listcellrenderer and extends label, and put this image you want to display in the icon field of the label.

    see the LWUIT listcellrenderer with image example application

Similar Threads

  1. How to append LWUIT List screen to a LWUIT Form in j2me?
    By pavanragi in forum Mobile Java General
    Replies: 1
    Last Post: 2012-08-06, 07:01
  2. Image in a LWUIT list
    By HasithaRandika in forum Mobile Java General
    Replies: 7
    Last Post: 2011-06-06, 14:26
  3. lwuit list +sub list its need to show sub list
    By babu7575 in forum Mobile Java General
    Replies: 0
    Last Post: 2011-04-04, 14:12
  4. how to display image in lwuit list?
    By hitendrasinh.gohil in forum Mobile Java General
    Replies: 1
    Last Post: 2010-12-23, 09:21
  5. List of lwuit...?
    By xmenus in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2010-07-29, 14:02

Posting Permissions

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