×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Feb 2012
    Posts
    60

    BackGroung Image of List in J2me

    Hi,How can i Set BackGround Image of list. Is there Any Way my class is extended from List.

  2. #2
    Regular Contributor
    Join Date
    Dec 2011
    Posts
    174

    Re: BackGroung Image of List in J2me

    Hi rana.anees

    You can't set the background Image of a lcdui list. For a custom user interface use a canvas and implement your own list there. Or you could also use some 3rd party toolkits like lwuit.

    -tiviinik

  3. #3
    Regular Contributor
    Join Date
    Feb 2012
    Posts
    60

    Re: BackGroung Image of List in J2me

    Quote Originally Posted by tiviinik View Post
    Hi rana.anees

    You can't set the background Image of a lcdui list. For a custom user interface use a canvas and implement your own list there. Or you could also use some 3rd party toolkits like lwuit.

    -tiviinik
    Hi now I am Using LWUIT .I want to show theme in my Form bcz even in LWUIT backGround Image in Not aallowed

    Resources r = Resources.open(getClass().getResourceAsStream("/t.res"));;
    UIManager.getInstance().setThemeProps(r.getTheme("t"));

    this my code of setting theme i created theme using resource editor which is with LWUIT tool kit .
    but i am getting nullExceptiion .

    how can i correct it kindly reply as early as possible

  4. #4
    Regular Contributor
    Join Date
    Dec 2011
    Posts
    174

    Re: BackGroung Image of List in J2me

    Is your t.res file in the right folder and is your theme named t? Have you tried the LWUITtheme.res file which comes with LWUIT package.

    Code:
    Resources r;
    try {
            r = Resources.open("/LWUITtheme.res");
            UIManager.getInstance().setThemeProps(r.getTheme("LWUITDefault"));
    } catch (IOException e) {
            e.printStackTrace();
    }
    -tiviinik

  5. #5
    Regular Contributor
    Join Date
    Dec 2011
    Posts
    174

    Re: BackGroung Image of List in J2me

    Here's a code snippet how to set a background image for a form in LWUIT.


    Code:
    Form main=new Form(); 
    	
    try { 
    	main.getStyle().setBgImage(Image.createImage("/image.png")); 
    } catch (IOException ex) { ex.printStackTrace(); } 
    			
    main.show();
    -tiviinik

Similar Threads

  1. How to display Thumbnail image in List in J2ME MIDlet
    By s.abulkalamazad in forum Mobile Java General
    Replies: 6
    Last Post: 2011-08-17, 11:03
  2. Drawing backgroung image in the listbox
    By kariwalasameer in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-10-20, 08:51
  3. Adding backgroung image and controls on it using Cavas
    By J2meDeveloper in forum Mobile Java General
    Replies: 29
    Last Post: 2009-05-20, 09:36
  4. j2me - contact list and event list
    By chia_84 in forum Mobile Java General
    Replies: 4
    Last Post: 2008-11-13, 09:40
  5. Backgroung Image for Dialog
    By engrsanjiv in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-09-04, 13:19

Posting Permissions

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