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. mysql创建唯一索引

    查看索引  show index from 数据库表名 alter table 数据库add index 索引名称(数据库字段名称) PRIMARY KEY(主键索引) ALTER TABLE `ta ...

  2. [转]Web App 框架选择之百度&腾讯

    百度的GMU GMU(Global Mobile UI)是百度前端通用组开发的移动端组件库,GMU是基于zepto的mobile UI组件库,提供webapp.pad端简单易用的UI组件.具有代码体积 ...

  3. 解决jar格式文件,双击不能直接运行问题

    前提:  安装了JDK 步骤: 1.先右击jar文件,打开方式->选择默认程序->浏览,选中jre下bin文件中javaw.exe(比如我的javaw.exe在C:\Program Fil ...

  4. http.ResponseWriter的Flush

    func handle(res http.ResponseWriter, req *http.Request) { fmt.Fprintf(res, "sending first line ...

  5. 关于Android开发的一些个人总结(2016.04)

    引言 本文主要目标是整理下我在2016年第一季度针对Android学习的内容,不会深入细节,只是简单聊聊框架以及学习的方法. 我的Android之路 因为之前对Android有一个简单的接触,研究生期 ...

  6. FIDDLER的使用方法及技巧总结(连载三)FIDDLER使用技巧及方法

    (接上篇!~~~~) 三.FIDDLER使用技巧及方法 1.AutoResponder选项卡的使用 Fiddler的AutoResponder 选项卡允许你使用本地硬盘的文件来作为返回内容,而不是把请 ...

  7. HTTP请求与响应报文详解

    如图所示,这是客户端往服务器发送请求时的报文: 一般来说,将报文分成三个部分,请求行.请求头.请求体 如图,请求行包括三部分内容 1.请求方法,在HTTP里的请求方法种类较多,但就移动端开发来说,常用 ...

  8. 用Total Commander for Android管理应用程序

    用Total Commander for Android管理应用程序 前不久安装了一个Total Commander的Anroid版本,除了用它来管理文件之外,我发现用它管理已安装程序挺不错的. 可以 ...

  9. C# DIctionary:集合已修改,可能无法执行枚举操作

    C#中直接对集合Dictionary进行遍历并修改其中的值,会报错,如下代码就会报错:集合已修改;可能无法执行枚举操作.代码如下 public void ForeachDic() { Dictiona ...

  10. page size == 4096 , nand size == 1GB, block size == 256kb 的ubi 文件系统制作

    mkubiimg.sh 2 sudo mkfs.ubifs -F -q -r rootfs_ecm_5410 -m 4096 -e 253952 -c 3600 -o ubifs.img 3 4 ec ...