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. Spark SQL利器:cacheTable/uncacheTable【转】

    转自:http://www.cnblogs.com/yurunmiao/p/4936583.html Spark相对于Hadoop MapReduce有一个很显著的特性就是“迭代计算”(作为一个Map ...

  2. 【驱动】DM9000A网卡驱动框架源码分析

    Linux网络设备结构 首先看一下Linux网络设备的结构,如下图: 网络协议接口层向网络层协议提供提供统一的数据包收发接口,不论上层协议为ARP还是IP,都通过dev_queue_xmit()函数发 ...

  3. FFmpeg filter简介

    [时间:2016-08] [状态:Open] [关键词:FFmpeg, filter, filter graph,命令行] 1. 引言及示例 FFmpeg中的libavfilter提供了一整套的基于f ...

  4. FastJson的常用操作

    FastJson的常用操作 2017-06-05 常用操作包括以下内容: 对象与(JsonObject或JsonArray)与String的互换 String转换为(JsonObject或JsonAr ...

  5. 如何使cmd窗口正确显示utf-8编码的文字

    http://blog.csdn.net/ehcoing/article/details/51865922 ********************************************** ...

  6. jetty 6.1 笔记

    download: http://dist.codehaus.org/jetty/jetty-6.1.22/ jetty 6.2 代码启动 必要jar包 lib --->> lib---& ...

  7. iOS开发:代码通用性以及其规范 第二篇(猜想iOS中实现TableView内部设计思路(附代码),以类似的思想实现一个通用的进度条)

    在iOS开发中,经常是要用到UITableView的,我曾经思考过这样一个问题,为什么任何种类的model放到TableView和所需的cell里面,都可以正常显示?而我自己写的很多view却只是能放 ...

  8. iOS中大文件下载(单线程下载)

    主要是需要注意,在客服端发请求给服务器的时候,在请求头里是可以设置服务器返回的数据从哪开始,到哪结束的. 当服务器响应客户端时,是可以拿到服务器返回数据具体类型以及大小的 思路: 在接收到服务器响应时 ...

  9. Win7窗口最大化和最小化快捷键

    原文: https://blog.csdn.net/u012269267/article/details/52484399 Windows 键 + 方向键“↑” 使当前使用的窗口最大化. Window ...

  10. jQuery实现radio第一次点击选中第二次点击取消功能(转)

    转载自:http://www.jb51.net/article/113730.htm 由于项目的需求,要求radio点击两次后为取消状态,不方便修改为checkbox,可以用正面的方法实现. // j ...