473,322 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 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 2224
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

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

Similar topics

11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
4
by: David Moss | last post by:
I was given a Compaq pocket PC with windows mobile 2002. I immediately began looking into how to program it and Java seemed initially to be a good choice. To my surprise I found it wasn't as...
3
by: Miguel Dias Moura | last post by:
Hello, in an ASP.net / VB page i created a form with a button. When the button is clicked i want to redirect to a new page. I have the following: .... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML...
2
by: Jim Heavey | last post by:
Hello, I had a web page which was working just fine. I then worked on making it comply with our corporate standards. To do so, I created 3 user controls, two for heading and one for the footer. ...
7
by: J-T | last post by:
I have a user control called "Test1" with two button on it ,one is input and the other one is a server control as follow: <input type="button"...
4
by: Ryan | last post by:
Hello, I have a standard HTML button on an aspx web form that I have set to runat server. The button is named reset1 and its tag is as follows: <INPUT id="btnReset1" style="WIDTH: 60px;...
10
by: Ben | last post by:
This is not a troll post. I am doing research on my own too but could use your guys/gals help. As mentioned in prev thread our company is about to embark on building a large scale web based...
63
by: s0suk3 | last post by:
I've been programming Python for a couple of years now. Now I'm looking to move on to either C++ or Java, but I'm not sure which. Which one do you think will be a better transition for a Python...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.