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 / February 2005

Tip: Looking for answers? Try searching our database.

howto disable 'ctrl + up-arrow' or keep focus?

Thread view: 
wizumwalt - 14 Feb 2005 00:06 GMT
I'm just trying to figure out why this happens as I haven't done
anything to set the focus or tab order in my forms.

My problem is when I click in one of my edit fields which is in a panel
of a JTabbedPane (so then I'm guessing that means the focus is there
too), and then I hold down 'ctrl' + 'up' keys, the focus goes to my tab.

Why does that happen? How would I make it so that 'ctrl' + 'up arrow'
don't change the focus out of the current component I'm in (like the
edit field).

Any help much appreciated.
John McGrath - 14 Feb 2005 14:50 GMT
> My problem is when I click in one of my edit fields which is in a panel
> of a JTabbedPane (so then I'm guessing that means the focus is there
> too), and then I hold down 'ctrl' + 'up' keys, the focus goes to my tab.
>
> Why does that happen?

Because that is how JTabbedPane binds the Ctrl-Up key.

> How would I make it so that 'ctrl' + 'up arrow' don't change the focus
> out of the current component I'm in (like the edit field).

Remove the Ctrl-Up key binding from the JTabbedPane's InputMap.  I think
it would be in the WHEN_ANCESTOR_OF_FOCUSED_COMPONENT map.

Signature

Regards,

John McGrath

Kari Ikonen - 15 Feb 2005 20:13 GMT
>> How would I make it so that 'ctrl' + 'up arrow' don't change the focus
>> out of the current component I'm in (like the edit field).
>
> Remove the Ctrl-Up key binding from the JTabbedPane's InputMap.  I think
> it would be in the WHEN_ANCESTOR_OF_FOCUSED_COMPONENT map.

In general, I would say that killing keyboard navigation support is bad
idea.
John McGrath - 16 Feb 2005 04:24 GMT
> In general, I would say that killing keyboard navigation support is bad
> idea.

I would agree, but he could have a good reason to do it in this case,
although I cannot think of what it might be.  In any case, it is not
up to me to judge his reasons.

Signature

Regards,

John McGrath



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.