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 ... 
随机推荐
- 12.22日wagas学习笔记
			第一部分:vue-cli3 vue.config.js配置: baseUrl:process.env.NODE_ENV === 'production'?'/production-sub-path': ... 
- C语言禁术——goto语句
			goto语句是一种无条件转移语句,goto 语句的使用格式为: goto 语句标号;其中标号是一个有效的标识符,这个标识符加上一个“:”(冒号)一起出现在函数内某处,执行goto语句后,程序 ... 
- RMSprop
- DIV+CSS兼容解决DIV最大宽度和最小宽度问题
			在制作网页中,我们经常会碰到min/max-width,min/max-height在IE6底下是无效的,这也是web设计师最头疼的问题之一,以下的方法可以解决这些难题,并且比较简约.当然,如果你还有 ... 
- JAVA-JSP内置对象之out对象求得缓冲区使用大小
			相关资料:<21天学通Java Web开发> out对象 out对象求得缓冲区使用大小1.通过out对象的getBufferSize()方法可以获得缓冲区的大小.2.通过getRemain ... 
- 对象序列化为何要定义serialVersionUID的来龙去脉
			在很多应用中,需要对某些对象进行序列化,让它们离开内存空间,入住物理硬盘,以便长期保存.比如最常见的是Web服务器中的Session对象,当有10万用户并发访问,就有可能出现10万个Session对象 ... 
- hystrix服务降级和服务熔断的区别
			故事的背景是这样的:由于小强在工作中碰到一些问题,于是想请教一下业界大牛小壮.于是发生了下面的两个场景: 小强在拿起常用手机拨号时发现该手机没有能够拨通,所以就拿出了备用手机拨通了某A的电话,这个过程 ... 
- 快速排序,一个爱情故事-java版
			public static void myquicksort(int[] ages,int girl,int boy){ //这是一个站在数组两端,追求完美爱情的故事 //年龄不匹配的不要 //第0步 ... 
- ubuntu 安装redis
			1. 下载安装: cd /tmp wget http://redis.googlecode.com/files/redis-2.2.4.tar.gz tar -zxf redis-2.2.4.tar. ... 
- Html模板渲染引擎Hogan
			Github:https://github.com/twitter/hogan.js 最简单的使用教程:http://www.imooc.com/article/18493 
