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. 找个些有用的网站(CSS生成)

    http://www.shejidaren.com/css-button-generator-and-beautifucl-style-sheet.html

  2. 如何优雅的退出/关闭/重启gunicorn进程

    在工作中,会发现gunicorn启动的web服务,无论怎么使用kill -9 进程号都是无法杀死gunicorn,经过我一番百度和谷歌,发现想要删除gunicorn进程其实很简单. 1. 寻找mast ...

  3. 【C/C++】标准IO操作

    fwrite实现文件复制 //@ author 成鹏致远 //@ net http://infodown.tap.cn //@ qq 552158509 //@ blog lcw.cnblogs.co ...

  4. 在IIS服务器上屏蔽IP的访问

    今天就跟大家分享一下在IIS服务器上如何屏蔽特定IP的访问,希望对大家有所帮助. 第一种方法:通过iis中的ip地址和域名限制. 此方法简单有效,建议使用 点击网站--右键属性--目录安全性--IP地 ...

  5. $.ajax使用总结(一):Form提交与Payload提交

    http://blog.csdn.net/yiifaa/article/details/73468001 *********************************************** ...

  6. jetty 6.1 笔记

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

  7. Python基本语法_强制数据类型转换

    目录 目录 前言 软件环境 Python数据类型的显式转换 显式转换的多种类型 Non-String转换为String str函数 repr str和repr的区别 eval Non-int转换为in ...

  8. 设计模式之模板方法模式&&迪米特法则(代码Objective-C展示)

    模板方法模式 模板方法模式:定义一个操作中的算法骨架,而将一些步骤延迟到子类中.模板方法使得子类可以在不改变一个算法的结构即可重定义该算法的某些特定步骤. 比如说,小时候数学老师的随堂检测,都是在黑板 ...

  9. google3aac509c9040e79d

    google-site-verification: google3aac509c9040e79d.html

  10. C# 多态理解

    封装.继承.多态,面向对象的三大特性,前两项理解相对容易,但要理解多态,特别是深入的了解,对于初学者而言可能就会有一定困难了.我一直认为学习OO的最好方法就是结合实践,封装.继承在实际工作中的应用随处 ...