When the focus is on a component, any focus traversal keys set for that component override the default focus traversal keys. For an example of how to change the focus traversal keys for the entire application, see e611 Setting Focus Traversal Keys for the Entire Application.

    // Change the forward focus traversal keys for a component
Set set = new HashSet(component.getFocusTraversalKeys(
KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS));
set.clear(); // Call clear() if you want to eliminate the current key set
set.add(KeyStroke.getKeyStroke("F2"));
component.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, set);
Related Examples

e610. Setting Focus Traversal Keys in a Component的更多相关文章

  1. e611. Setting Focus Traversal Keys for the Entire Application

    This example changes the focus traversal keys for the entire application. For an example of how to c ...

  2. e613. Modifying the Focus Traversal Order

    JFrame frame = new JFrame(); JButton component1 = new JButton("1"); JButton component2 = n ...

  3. How to remove focus without setting focus to another control?

    How to remove focus without setting focus to another control? Ask Question up vote 67 down vote favo ...

  4. e612. Moving the Focus to the Next or Previous Focusable Component

    The methods to move the focus to the next or to the previous focusable component are Component.trans ...

  5. Qt QML Component 学习笔记

    简介 Component是Qt封装好的.只暴露必要接口的QML类型,可以重复利用.一个QML组件就像一个黑盒子,它通过属性.信号.函数和外部世界交互. 一个Component既可以定义在独立的QML文 ...

  6. 【移动端debug-4】iOS下setTimeout无法触发focus事件的解决方案

    开篇总结:其实目前无法解决这个bug. 这两天做项目遇到了这个case,项目需求是打开页面的时候,input元素自动弹起键盘.由于各种方面的考虑,我们希望通过setTimeout延时200毫秒让inp ...

  7. UI Framework-1: Aura Focus and Activation

    Focus and Activation Focus and Activation are closely related.   Definitions Focused window - this i ...

  8. qt qml 类型之Keys

    Keys 类是 Qt Quick 提供的,专门供 Item 处理按键事件的类.它定义了很多针对特定按键的信号,比如 onReturnPressed / onEscapePressed / onDown ...

  9. js实现省市区联动

    先来看看效果图吧,嘻嘻~~~~~~~~~~~~~~~~~~~· 代码在下面: 示例一: html: <!DOCTYPE html> <html> <head> &l ...

随机推荐

  1. Linux的sysctl 命令参数详解

    Linux内核通过/proc虚拟文件系统向用户导出内核信息,用户也可以通过/proc文件系统或通过sysctl命令动态配置内核.比如,如果我们想启动NAT,除了加载模块.配置防火墙外,还需要启动内核转 ...

  2. Linux--多网卡的7种Bond模式【转】

    转自:http://www.cnblogs.com/lcword/p/5914089.html 网卡bond是通过把多张网卡绑定为一个逻辑网卡,实现本地网卡的冗余,带宽扩容和负载均衡.在应用部署中是一 ...

  3. 使用httpclient下载 页面、图片

    代码 import java.io.IOException; import java.io.UnsupportedEncodingException; import org.apache.http.c ...

  4. JAVA-JSP内置对象之pageContext对象

    相关资料:<21天学通Java Web开发> pageContext对象1.pageContext对象不但可以用来设置page范围的属性,同样也可以用来设置其他范围属性,不过需要指定范围参 ...

  5. CAD技巧之001——如何将单个字合并起来

    CAD技巧之001——如何将单个字合并起来 很多同志如果遇到奇葩的单个文字合并,怎么办,重新书写?复制粘贴?如果工作量很大,怎么办呢. 今天九天就教您一个好方法! 废话不多说,上动画片

  6. Mac OS X上如何实现到Linux主机的ssh免登陆

    转载说明: 本文转载自 http://www.aips.me/mac-key-ssh-login-linux.html 生成密钥对 用密码登录远程主机,将公钥拷贝过去 done 第一步:生成密匙对执行 ...

  7. Web Server 与 App Server

    Web Server 常见的Web Server有Apache Server与Nginx. Apache Http Server是Apache软件基金会下的一个项目,是一款开源的HTTP服务器软件(它 ...

  8. 调整Intellij IDEA内存

    最近IDEA真是卡的要死,下面

  9. 【WPF】添加自定义字体

    需求:在WPF项目中使用幼圆字体. 步骤: 1.首先要有幼圆TTF字体文件.在C:\Windows\Fonts目录下找,如果系统字体库中没有,就上网下一份,如这里或这里. 2.将字体文件复制到WPF项 ...

  10. C语言 · 3000米排名预测

    算法提高 3000米排名预测   时间限制:1.0s   内存限制:256.0MB      问题描述 3000米长跑时,围观党们兴高采烈地预测着最后的排名.因为他们来自不同的班,对所有运动员不一定都 ...