473,405 Members | 2,287 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,405 software developers and data experts.

KeyEvent

Plz tell what is the use of making a panel set focusable
<p.setFocusable(true);>
while using key events is this necessary?
Jul 28 '07 #1
1 1464
blazedaces
284 100+
Plz tell what is the use of making a panel set focusable
<p.setFocusable(true);>
while using key events is this necessary?
You just posted in the previous thread, but here's the link again to the tutorial:

http://java.sun.com/docs/books/tutorial/uiswing/events/keylistener.html

Here's what I suggest, download the example and try NOT setting setFocusable(true) and see if it works. That will tell you simply if it is necessary. Beforehand it worked, if it doesn't work afterhand you know it's necessary. If it does, you know it's not...

-blazed
Jul 28 '07 #2

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

Similar topics

1
by: Lannsjö | last post by:
Hi Im trying to learn Java and cant really figure out how to use keyEvents. I want to know if a person has pressed y or n in a method. void doCloseCommand (int status) { statusInfo.setText("Are...
0
by: Dennis Schulz | last post by:
I have the following problem: after triggering a mouse event in a JList i still want the key focus to be in another panel. I tried to call the requestfocus() method of the panel that should get...
1
by: ash | last post by:
hi, is there a way to register application wide hotkey in wxpython? i tried wxWindow::RegisterHotKey(). but the problem is it registers the hotkey as a system wide hotkey. this causes problems in...
0
by: ghost | last post by:
i have a main form, with user controls populating it. i'm trying to capture a keyevent for the control that's populating the form but it never fires that event. the main form's keypreview...
2
by: hans.duedal | last post by:
The Gecko DOM reference gave me the idea that an onscreen keyboard I was doing should use Key Events, so the user may for instance place a letter anywhere, and such. While this can be handled using...
7
mishela
by: mishela | last post by:
I wonder how do I create a shortcut in java, for example Ctrl+S for save and so on.. I tried to make a keyEvent for the whole frame, but it didn't work. Can somebody help me with this please?
3
by: true blue | last post by:
below is a simple program to check key event ,it doesnt give any error nor an exception at runtime plz tell where im goin wrong code<text> import java.awt.*; import java.awt.event.*;
0
by: naveennm | last post by:
Hi, In my application I have to check that if alt-tab is pressed then certain validation should not be done. But I dont know how to capture alt-tab key event. Please help me in this regard....
6
by: pankajs | last post by:
Hello freinds! I m making a game but I m facing a problem that when I click New Game button(defined by me) animation starts. But in the animation keys are not working even the Close button at the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.