×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    41

    Use Image as a selection

    Hello, is it possible to use an image as a selection. what i mean is that, if you can highlight on an image and it takes you to the next screen. If its possible pls could you show how to do that or any links will do.

    Thanks.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: Use Image as a selection

    Yes, it is possible.

    Do you want to do it on Touch / or non-touch device.

    Simple way will be to use Grid layout of LWUIT and place buttons with images on it, thou you can program it yourself using Custom item in J2me MIDP or going directly on canvas.

    thanks,
    ~Amitabh

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Use Image as a selection

    Hello,
    Are you trying to draw the image as the selection of the menu items or so?
    Yes that's quite possible and can be done in multiple ways, one is described by im2amit and another can be using the simple Canvas.You can follow like this,
    1. load the immutable image from the resource
    2. Then you can take a int variable say currentSelection
    3. then you draw the string and as per the desired value of the currentSelection you use,like this
    if(currentSelection is blablabla)
    {
    // draw the image
    graphics.drawImage(imageSelection,x, y , anchor);

    }
    else
    {
    // do not draw the image

    }
    Please check that whether this can help you,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

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

    Re: Use Image as a selection

    You can try to re-use this code from my canvas menu example on FN Wiki:

    http://wiki.forum.nokia.com/index.ph...Menu_on_Canvas

    Just change the String options array to an array of images, and instead of drawtString use drawImage in the paint method.

    thanks,
    ~Amitabh

  5. #5
    Registered User
    Join Date
    Feb 2009
    Posts
    41

    Re: Use Image as a selection

    sorry for the late response.. thank you guys for your response

    @im2amit, yes i would prefer it on a touch screen phone... but apparently i have no clue how to use Lwuit, but i hear its not hard at all and thanks for the link too.

  6. #6
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    208

    Re: Use Image as a selection

    Quote Originally Posted by iparrot View Post
    sorry for the late response.. thank you guys for your response

    @im2amit, yes i would prefer it on a touch screen phone... but apparently i have no clue how to use Lwuit, but i hear its not hard at all and thanks for the link too.
    The advantage of using LWUIT would be - it supports touch events implicitly. You don't have to do anything to handle it. First try the LWUIT demo application (supplied with the LWUIT download package) and see if that is something you want to do...

  7. #7
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: Use Image as a selection

    Try to see LWUIT at https://lwuit.dev.java.net/

    and go thu --https://lwuit.dev.java.net/tutorial/index.html

    its simple to understand and easy to use.

    thanks,
    ~Amitabh

  8. #8
    Registered User
    Join Date
    Oct 2009
    Posts
    15

    Cool problem when deploying lwuit prog in my N73 ??

    hi all
    i have problem when deploying lwuit program designed using netbeans
    it works well in emulator but when i deploy it to my N73 mobile it said App not supported ?????

  9. #9
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: problem when deploying lwuit prog in my N73 ??

    Quote Originally Posted by ahmedcse View Post
    hi all
    i have problem when deploying lwuit program designed using netbeans
    it works well in emulator but when i deploy it to my N73 mobile it said App not supported ?????
    What are the CLDC and MIDP version in you jad file.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Image selection dialog
    By jwjwjw2k in forum Symbian
    Replies: 5
    Last Post: 2010-07-22, 10:35
  2. J2ME Scaling big JPEG files on S60 5th ed and CS001269
    By m1ha3l in forum Mobile Java Media (Graphics & Sounds)
    Replies: 14
    Last Post: 2010-04-06, 07:05
  3. AknIconUtils is caching the image
    By Tatanka.nbr1 in forum Symbian
    Replies: 12
    Last Post: 2007-01-05, 19:08
  4. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31
  5. Replies: 0
    Last Post: 2003-05-12, 17: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
  •  
×