472,119 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

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
2 2168
r035198x
13,262 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 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.