Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2004

Tip: Looking for answers? Try searching our database.

KeyRelease Event affects next Internal Frame

Thread view: 
Arun Kumar Srinivasan - 08 Jan 2004 11:44 GMT
Hi,
 I am working on an MDI application using JInternalFrames. I have
forms to fill that have the 'Next', 'Back' and 'Cancel' buttons. I am
assigning key presses (Enter, Alt+left and Esc respectively) through
KeyRelease event. In addition, the 'Next' button is assigned as the
default button using
this.getRootPane().setDefaultButton(btnOK). However, I find that when
I run the program and press the Enter key, after accepting the enter
and processing the button action, it loads the next JInternalFrame and
appears to call the KeyRelease event for this form too. Since I have
entries that must be filled, this raises errors that entries are not
filled.
 Can anyone tell me what I am doing wrong.
Thanks in advance,
Arun Kumar Srinivasan
Ryan Stewart - 08 Jan 2004 12:38 GMT
> Hi,
>   I am working on an MDI application using JInternalFrames. I have
[quoted text clipped - 11 lines]
> Thanks in advance,
> Arun Kumar Srinivasan

I've never worked with them myself, but my guess would be that the
setDefaultButton method makes the button listen for a KeyPressed event.
Therefore, you press Enter, and btnOK reacts to the KeyPressed event, which
causes it to load the next frame. Then you release Enter, and your code
catches this release and processes it.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.