Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User hannkwang's Avatar
    Join Date
    Nov 2009
    Posts
    5
    Hi,

    I will like to create J2ME touch buttons. I have created a rectangle canvas and will like to use the coordinates to fire the event. Appreciate if you can post some codes or links to help.

    Thanks,

  2. #2
    Nokia Developer Champion Tiger79's Avatar
    Join Date
    Apr 2007
    Posts
    2,697

  3. #3
    Registered User hannkwang's Avatar
    Join Date
    Nov 2009
    Posts
    5
    not really. I will like to have two touchable buttons (no tactile) and each button will go to the next page. But this is a wonderful url. I will keep researching

  4. #4
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    You can also ref. to this code example: http://wiki.forum.nokia.com/index.ph..._Touch_Devices

    Making complete keyboard on Canvas that works with touch.

    thanks,
    ~Amitabh

  5. #5
    Registered User hannkwang's Avatar
    Join Date
    Nov 2009
    Posts
    5
    Guys, Thanks for your help. I am understanding this better now.

    I have to use CustomItem to create the button so that it calls on the 'button'. I have create two customitem but how can l make each customitem run its own function when pressed?

    Example: When C1 is pressed, it runs function A, and when C2 is pressed, it runs a separate function?

    attach codes
    form = new Form("CustomItemMIDletExample");
    exit = new Command("Exit", Command.EXIT, 0);

    CustomItemExample C1 = new CustomItemExample("Enter");
    form.append(C1);

    CustomItemExample C2 = new CustomItemExample("Exit");
    form.append(C2);

  6. #6
    Nokia Developer Champion Tiger79's Avatar
    Join Date
    Apr 2007
    Posts
    2,697
    are you cgonna useCommands ?
    then u need the Commandlistener interface...

  7. #7
    Registered User hannkwang's Avatar
    Join Date
    Nov 2009
    Posts
    5
    i want to use two touch buttons. not using the left and right soft keys.

  8. #8
    Nokia Developer Champion Tiger79's Avatar
    Join Date
    Apr 2007
    Posts
    2,697
    well then you will have to use your own logic..
    The link I posted is still usable, in that code you can see how to react on an user actually pressing on your canvas...
    then you take the coordinates of this "click", check if they are within the boundaries of one of your buttons and act according to that...

    That means you can create your own customItem (which has it's own canvas if I'm not mistaken) and use the above to implement your two buttons and act on any of those being pressed...

    May I ask what you mean with "I will like to have two touchable buttons (no tactile)" ?
    Tactile is another word for touch...

Similar Threads

  1. how to use the touch ui in j2me
    By junaid888 in forum Mobile Java General
    Replies: 8
    Last Post: 2010-12-30, 11:31
  2. Need to use J2ME Polish framework
    By yatin.frankline in forum Mobile Java General
    Replies: 1
    Last Post: 2010-04-07, 11:46
  3. Can I create an application to auto press key button by J2ME
    By WerA in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2010-02-24, 14:26
  4. Disable Menu Button Using J2ME
    By jaceline in forum Mobile Java General
    Replies: 5
    Last Post: 2006-04-25, 16:42
  5. New to J2ME
    By onelife511 in forum Mobile Java General
    Replies: 5
    Last Post: 2006-01-28, 19:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved