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 ...
随机推荐
- vm12序列号
VMware tools怎么删除rpm -e open-vm-tools-desktop vm12序列号5A02H-AU243-TZJ49-GTC7K-3C61NVF5XA-FNDDJ-085GZ-4 ...
- maven 使用记录之修改 maven默认jdk版本
maven package执行的时候会遇到jdk版本不对的问题 :原因是 maven所指定的jdk版本与项目使用的jdk版本不一致 1.项目属性的 java compiler可以设置 2.直接修改 m ...
- java 多线程 27 :多线程组件之CountDownLatch
前言 在多线程环境下,JDK给开发者提供了许多的组件供用户使用(主要在java.util.concurrent下),使得用户不需要再去关心在具体场景下要如何写出同时兼顾线程安全性与高效率的代码.之前讲 ...
- 随机颜色-js
function ramColor() { return '#' + ('00000' + (Math.random() * 0x1000000 << 0).toSt ...
- ARKit从入门到精通(1)-ARKit初体验
ARKit从入门到精通(1)-ARKit初体验 转载自:http://blog.csdn.net/u013263917/article/details/72903174 该系列文章共十篇,笔者将由易到 ...
- java框架篇---Struts2的处理流程
一.Struts2的处理流程: 客户端产生一个HttpServletRequest的请求,该请求被提交到一系列的标准过滤器(Filter)组建链中(如ActionContextCleanUp:它主要是 ...
- Linux 下MongoDb的安装
MongoDb在linux可以说是非常的简单的. 先下载: curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.6.tg ...
- JS获取电脑或手机屏幕的分辨率
s = " 屏幕分辨率的高:"+ window.screen.height+"\n"; s += " 屏幕分辨率的宽:"+ window.s ...
- [转]python进行中文文本聚类(切词以及Kmeans聚类)
简介 查看百度搜索中文文本聚类我失望的发现,网上竟然没有一个完整的关于Python实现的中文文本聚类(乃至搜索关键词python 中文文本聚类也是如此),网上大部分是关于文本聚类的Kmeans聚类的原 ...
- vmware 8 完美支持UEFI+GPT模式虚拟机
http://www.cn-dos.net/forum/viewthread.php?tid=54271提及新版vmware支持uefi启动,于是安装了最新版vmware 8.0.2,发现vmware ...