473,775 Members | 2,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

react to 1-9 button click in java mobile app

88 New Member
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 2238
r035198x
13,262 MVP
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
BlackMustard
88 New Member
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
9271
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 C++. I find my self sometimes, trying Object app = Object(); Object *app = Object(); Object app = new Object();
4
4812
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 straightforward as Java for the desktop. Even finding a JRE for the PDA is a nightmare. The PC came with Jeode, a version of PersonalJava. PersonalJava is no longer supported by SUN.
3
40739
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 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <script runat="server"> void goToPage(object sender, System.EventArgs e)
2
1415
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. One of these user controls has a button. After I get all done, when I bring up the page and press the button within the second user control, there is no response. The pressing of the button does not cause a server response at all. It is as if there...
7
2552
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" onClick="this.disabled=true;document.getElementById(btnSend).click();value="Go!"> <asp:button id="btnSend" runat="server" onClick="click" Width="90px" Text="HiddenControl" Visible="False"></asp:button> As you can see the asp.net button is calling a java script function as follows:
4
6535
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; HEIGHT: 24px" type="reset" value="Reset" name="btnReset1" runat="server"> Using Interdev I then double click the button in design view and in the code behind page (aspx.vb) have the following:
10
1560
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 application. "Shimmy" provided some help already but need more. This app will be hit by thousands of users, large data sets and be fed by GPS handheld devices such as cell phones, which will also require apps we write running on them. The response...
63
4992
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 programmer? Which one will educate me the best?
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9915
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5358
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4014
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.