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 ...
随机推荐
- DIOCP开源项目-Delphi高性能无锁队列(lock-free)
最近想在DIOCP中加入任务调度线程,DIOCP的工作线程作为生产者(producer)将接受到的数据对象,投递到任务调度线程中,然后统一进行分配.然而这一切都需要一个队列, 这几天都在关注无锁队列. ...
- JAVA开发的23种设计模式之 --- 桥接模式
桥接模式 概述:将抽象部分与他的实现部分分离,这样抽象化与实现化解耦,使他们可以独立的变化.如何实现解耦的呢,就是通过提供抽象化和实现化之间的桥接结构. 应用场景 实现系统可能有多 ...
- Android下基于PCM的音频渲染
环境准备 请按照我之前的文章-Android下基于SDL的位图渲染,安装必要的开发环境. 实践篇 这里主要参考Beginning SDL 2.0(6) 音频渲染及wav播放,只不过将源从WAV文件改成 ...
- LeetCode: Binary Tree Postorder Traversal 解题报告
Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes' va ...
- jQuery 学习笔记1 弹出一个对话框
这里推荐使用sublime text 2来写,外加zen coding. 首先是写html 只需要html:xt,然后tab就可以得到一个html的完整结构. <!DOCTYPE html PU ...
- css按钮口诀 - CSS BUG顺口溜
在进行CSS网页布局时遇到BUG,请认真阅读以下内容,非常容易记忆的,不知道哪位高人把CSS BUG编成了顺口溜了!看看好不好记住呢? 一.IE边框若显若无,须注意,定是高度设置已忘记: 二.浮动产生 ...
- Node.js学习笔记(4)--简单路由,老师学生id
说明(2017-5-2 17:57:23): 1. foo.js var http = require("http"); var url = require("url&q ...
- myeclipse之SSH整合图文详解
首先搭建开发环境 打开MyEclipse,新建一个web project ,然后右击项目执行如下步骤: 开启服务器无错误即搭建成功,整合后项目目录: 另附上SSH所必须的开发包:
- Android 异步任务——AsyncTask (附使用AsyncTask下载图片Demo)
我们编程的时候经常需要处理同步任务和异步任务,在Android里面存在一个特性,就是UI线程是不安全的线程.所谓UI线程不安全也就是我们的主线程(进程启动的第一个线程)不能在线程外操作主线程的资源.因 ...
- Java 原码 反码 补码
本篇文章讲解了计算机的原码, 反码和补码. 并且进行了深入探求了为何要使用反码和补码, 以及更进一步的论证了为何可以用反码, 补码的加法计算原码的减法. 论证部分如有不对的地方请各位牛人帮忙指正! 希 ...