e611. Setting Focus traversal Keys for the entire application

Source: Internet
Author: User

This example changes the focus traversal keys for the entire application. For the example of the the Focus traversal keys in a particular component, see e610 Setting Focus Trave Rsal Keys in a Component.

The forward focus traversal keys for the application Set set = New HashSet (KEYBOARDFOCUSMANAGER.GETCU    Rrentkeyboardfocusmanager (). Getdefaultfocustraversalkeys (Keyboardfocusmanager.forward_traversal_keys));   Set.clear (); Call Clear () if you want to eliminate the current key set Set.add (Keystroke.getkeystroke ("F2"));        Keyboardfocusmanager.getcurrentkeyboardfocusmanager (). Setdefaultfocustraversalkeys (        Keyboardfocusmanager.forward_traversal_keys, set); The backward focus traversal keys for the application set = new HashSet (Keyboardfocusmanager.getcurre    Ntkeyboardfocusmanager (). Getdefaultfocustraversalkeys (Keyboardfocusmanager.backward_traversal_keys));   Set.clear (); Call Clear () if you want to eliminate the current key set Set.add (Keystroke.getkeystroke ("F3"));        Keyboardfocusmanager.getcurrentkeyboardfocusmanager (). Setdefaultfocustraversalkeys (        Keyboardfocusmanager.backward_traversal_keys, set);    Remove all forward and backward focus traversal keys for the application set.clear ();        Keyboardfocusmanager.getcurrentkeyboardfocusmanager (). Setdefaultfocustraversalkeys (    Keyboardfocusmanager.forward_traversal_keys, set);        Keyboardfocusmanager.getcurrentkeyboardfocusmanager (). Setdefaultfocustraversalkeys ( Keyboardfocusmanager.backward_traversal_keys, set);

related Examples

e611. Setting Focus traversal Keys for the entire application

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.