e610. Setting Focus Traversal Keys in a Component
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的更多相关文章
- 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 ...
- e613. Modifying the Focus Traversal Order
JFrame frame = new JFrame(); JButton component1 = new JButton("1"); JButton component2 = n ...
- 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 ...
- 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 ...
- Qt QML Component 学习笔记
简介 Component是Qt封装好的.只暴露必要接口的QML类型,可以重复利用.一个QML组件就像一个黑盒子,它通过属性.信号.函数和外部世界交互. 一个Component既可以定义在独立的QML文 ...
- 【移动端debug-4】iOS下setTimeout无法触发focus事件的解决方案
开篇总结:其实目前无法解决这个bug. 这两天做项目遇到了这个case,项目需求是打开页面的时候,input元素自动弹起键盘.由于各种方面的考虑,我们希望通过setTimeout延时200毫秒让inp ...
- UI Framework-1: Aura Focus and Activation
Focus and Activation Focus and Activation are closely related. Definitions Focused window - this i ...
- qt qml 类型之Keys
Keys 类是 Qt Quick 提供的,专门供 Item 处理按键事件的类.它定义了很多针对特定按键的信号,比如 onReturnPressed / onEscapePressed / onDown ...
- js实现省市区联动
先来看看效果图吧,嘻嘻~~~~~~~~~~~~~~~~~~~· 代码在下面: 示例一: html: <!DOCTYPE html> <html> <head> &l ...
随机推荐
- C++11 override和final
30多年来,C++一直没有继承控制关键字.最起码这是不容易的,禁止一个类的进一步衍生是可能的但也很棘手.为避免用户在派生类中重载一个虚函数,你不得不向后考虑. C++ 11添加了两个继承控制关键字:o ...
- vim学习笔记(11):vim 去掉<200b>
vim查看文件,发现多了<200b>字符,使用/200b搜索匹配不上:grep 200b 也匹配不上 查询后才知道:200b是:Unicode Character 'ZERO WIDTH ...
- SM2椭圆曲线公钥密码算法
国家必须要有属于自己的一套加密机制才行...好复杂.分享下看哪位看得懂其中的原理 国家密码管理局于2010年12月17日发布了SM2椭圆曲线公钥密码算法,并要求为对现有基于RSA算法的电子认证系统.密 ...
- ffmpeg转码参数设置
ffmpeg用了很久了,也没有想写点什么. 刚接触ffmpeg也是有大量的不理解的地方,不过慢慢的了解多了基本上都是可以使用的. 本文主要介绍如何使用ffmpeg.exe进行转码.编译好的ffmpeg ...
- if __name__ == '__main__' 含义
if __name__ == '__main__': app.run(host = '0.0.0.0',debug=app.config['DEBUG']) 1.是项目入口的含义2.如果是在生产环境下 ...
- Oracle报错:ORA-06508: PL/SQL: 无法找到正在调用的程序单元
原因:调用的存储过程已经被修改过. 解决方案:重新编译存储过程.
- 在分布式系统里看CAP定理
本文转自:http://zhuanlan.51cto.com/art/201703/534587.htm 计算机界有很多高大上又难于理解的术语,CAP就是其中之一, 什么一致性(Consistency ...
- Python3 ctypes简单使用
>>> from ctypes import * >>> c_int() c_long(0) >>> c_char_p(b'hello') c_c ...
- Thrift——栗子
这张经典的图:黄色部分是用户实现的业务逻辑,褐色部分是根据Thrift定义的服务接口描述文件(IDL,接口定义语言)生成的客户端和服务端代码框架,红色部分是根据Thrift文件生成代码实现数据的读写操 ...
- C语言 · 最长字符串
算法训练 最长字符串 时间限制:1.0s 内存限制:512.0MB 求出5个字符串中最长的字符串.每个字符串长度在100以内,且全为小写字母. 样例输入 one two three ...