BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-22-2008, 10:39 AM   #1
eforr
Knows Where the Search Button Is
 
Join Date: May 2008
Model: 7100i
PIN: N/A
Carrier: nextel
Posts: 23
Default Button click event

Please Login to Remove!

Hello,
i'm pretty new to programming in j2me and i wondering how do you set up a click event so taht when user clicks button certain things happen
Offline  
Old 07-22-2008, 10:52 AM   #2
Jayaseelan
Thumbs Must Hurt
 
Join Date: Jun 2008
Location: Chennai
Model: 8130
PIN: N/A
Carrier: AIRTEL
Posts: 51
Default

Quote:
Originally Posted by eforr View Post
Hello,
i'm pretty new to programming in j2me and i wondering how do you set up a click event so taht when user clicks button certain things happen
HI,

R u working with J2ME or Blackberry API's ?
__________________
Jayaseelan.V
Mobile Application Developer
INDIA.
Offline  
Old 07-22-2008, 10:53 AM   #3
eforr
Knows Where the Search Button Is
 
Join Date: May 2008
Model: 7100i
PIN: N/A
Carrier: nextel
Posts: 23
Default

Blackberry API's
Offline  
Old 07-22-2008, 10:58 AM   #4
Jayaseelan
Thumbs Must Hurt
 
Join Date: Jun 2008
Location: Chennai
Model: 8130
PIN: N/A
Carrier: AIRTEL
Posts: 51
Default

Hi,

Use FieldChangeListener interface..

You can able to make event through button by using this..
__________________
Jayaseelan.V
Mobile Application Developer
INDIA.
Offline  
Old 07-22-2008, 10:59 AM   #5
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Just do something like tis :

Code:
ButtonField button = new ButtonField("Valider")
            {
                protected boolean trackwheelClick(int status, int time)
                {
                    //Do what you want the button make
                    function() // for example
                    return true;
                }           
            };
And don't forget to add your button to the screen after
Offline  
Old 07-22-2008, 11:00 AM   #6
Aiwa
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Default

Create a new Class that extends "ButtonListener", then overwrite all the methods it ask you to.
Then on the main class, just button.setListener(Mathod)
I think, i might have messed up on the order or something, but the idea is basically that..
Offline  
Old 07-22-2008, 11:00 AM   #7
Aiwa
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Default

Quote:
Originally Posted by goulamass View Post
Just do something like tis :

Code:
ButtonField button = new ButtonField("Valider")
            {
                protected boolean trackwheelClick(int status, int time)
                {
                    //Do what you want the button make
                    function() // for example
                    return true;
                }           
            };
And don't forget to add your button to the screen after
or that
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Carrier 8.5 Technician Tool Field Assistant USB-L i-Vu USB Link Rnet cable TKIT picture

Carrier 8.5 Technician Tool Field Assistant USB-L i-Vu USB Link Rnet cable TKIT

$198.00



USA Windows VPS RDP Server/ Windows VPS Hosting - 4GB RAM + 150GB HDD picture

USA Windows VPS RDP Server/ Windows VPS Hosting - 4GB RAM + 150GB HDD

$11.99



MRG-3800V-R 800W Server Power Supply, Untested picture

MRG-3800V-R 800W Server Power Supply, Untested

$249.99



CAMBRO Insulated Beverage Server Container 4.75 Gallon Blue picture

CAMBRO Insulated Beverage Server Container 4.75 Gallon Blue

$61.99



RDP SERVER / VPS SERVER 2 GB RAM + 80 GB HDD picture

RDP SERVER / VPS SERVER 2 GB RAM + 80 GB HDD

$7.99



Used & Tested FSP FSP300-701UJ Server Power Supply picture

Used & Tested FSP FSP300-701UJ Server Power Supply

$153.62







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.