467,075 Members | 995 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,075 developers. It's quick & easy.

react to 1-9 button click in java mobile app

hi all,

i'm building my first java application for symbian os, and need to write custom logic to react to buttons 1-9 being pressed. how do i do that? where do i add the routines etc?

i'm using netbeans 6.0 with the mobility pack, so if there's a visual "shortcut" i'll gladly use it ;)

thanks!
-tomas
Dec 14 '07 #1
  • viewed: 2062
Share:
2 Replies
8TB
hi all,

i'm building my first java application for symbian os, and need to write custom logic to react to buttons 1-9 being pressed. how do i do that? where do i add the routines etc?

i'm using netbeans 6.0 with the mobility pack, so if there's a visual "shortcut" i'll gladly use it ;)

thanks!
-tomas

Just query the keyCode in the keyPressed or keyReleased method to find out which button was clicked.
Have a look at this page for some details.
Dec 18 '07 #2
Just query the keyCode in the keyPressed or keyReleased method to find out which button was clicked.
Have a look at this page for some details.
thanks for your reply! unfortunately it didn't get me all the way... i'm extremely new to java, and so far i've done everything in some sort of "design view" in netbeans 6. i took a look at the page and understood some of it, but when i tried to insert the
Expand|Select|Wrap|Line Numbers
  1. protected void keyPressed(int keyCode){}
method i just got errors everywhere...

do you know any way to insert this method in the right place through some menu or "toolbox" in the netbeans ide?
Dec 20 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by David Moss | last post: by
3 posts views Thread by Miguel Dias Moura | last post: by
2 posts views Thread by Jim Heavey | last post: by
10 posts views Thread by Ben | last post: by
63 posts views Thread by s0suk3@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.