e613. Modifying the Focus Traversal Order
JFrame frame = new JFrame();
JButton component1 = new JButton("1");
JButton component2 = new JButton("2");
JButton component3 = new JButton("3"); // By default, the focus traversal order is the same as the insertion order
frame.getContentPane().setLayout(new FlowLayout());
frame.getContentPane().add(component1);
frame.getContentPane().add(component2);
frame.getContentPane().add(component3); // Change the order from 1,2,3 to 1,3,2
component1.setNextFocusableComponent(component3);
component3.setNextFocusableComponent(component2);
component2.setNextFocusableComponent(component1); // Restore the order to 1,2,3
component1.setNextFocusableComponent(null);
component2.setNextFocusableComponent(null);
component3.setNextFocusableComponent(null);
| Related Examples |
e613. Modifying the Focus Traversal Order的更多相关文章
- 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 ...
- 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 defau ...
- UI Framework-1: Aura Focus and Activation
Focus and Activation Focus and Activation are closely related. Definitions Focused window - this i ...
- 开发一个Swing功能时的一点总结
对JTextField进行效验,有两个途径:(1)是使用javax.swing.InputVerifier在获取焦点时进行校验(2)在点击“确定”按钮的监听事件中对控件的值进行校验 鉴于涉及的业务比较 ...
- 2.5 – Garbage Collection 自动垃圾回收 Stop-the-world vs. incremental vs. concurrent 垃圾回收策略
2.5 – Garbage Collection 自动垃圾回收 Lua 5.3 Reference Manual http://www.lua.org/manual/5.3/manual.html# ...
- LinkedBlockingQueueE(示例,出错代码)
java.util.concurrent 类 LinkedBlockingQueue<E> java.lang.Object java.util.AbstractCollection< ...
- Java多线程系列--“JUC集合”07之 ArrayBlockingQueue
概要 本章对Java.util.concurrent包中的ArrayBlockingQueue类进行详细的介绍.内容包括:ArrayBlockingQueue介绍ArrayBlockingQueue原 ...
- Java多线程系列--“JUC集合”08之 LinkedBlockingQueue
概要 本章介绍JUC包中的LinkedBlockingQueue.内容包括:LinkedBlockingQueue介绍LinkedBlockingQueue原理和数据结构LinkedBlockingQ ...
- Java多线程系列--“JUC集合”09之 LinkedBlockingDeque
概要 本章介绍JUC包中的LinkedBlockingDeque.内容包括:LinkedBlockingDeque介绍LinkedBlockingDeque原理和数据结构LinkedBlockingD ...
随机推荐
- Multi-Cloud & Kubernetes: Cloud Academy November 2018 Data Report
https://cloudacademy.com/research/multi-cloud-kubernetes-devops-cloud-academy-data-report-nov-18/ No ...
- 实战mysql分区
前些天拿到一个表,将近有4000w数据,没有任何索引,主键.(建这表的绝对是个人才) 这是一个日志表,记录了游戏中物品的产出与消耗,原先有一个后台对这个表进行统计.....(这要用超级计算机才能统计得 ...
- [Windows Azure] How to Configure Cloud Services
How to Configure Cloud Services To use this feature and other new Windows Azure capabilities, sign u ...
- iOS开发之蓝牙
// // ViewController.m // 13-蓝牙 // // Created by hongqiangli on 2017/7/21. // Copyright © 李洪强. A ...
- iframe高度自适应方法大全
http://www.3tii.com/993.html http://caibaojian.com/iframe-adjust-content-height.html http://www.jb51 ...
- 项目日志的管理和应用 log4js-Node.js中的日志管理模块使用与封装
开发过程中,日志记录是必不可少的事情,尤其是生产系统中经常无法调试,因此日志就成了重要的调试信息来源. Node.js,已经有现成的开源日志模块,就是log4js,源码地址:点击打开链接 项目引用方法 ...
- Auty 2017——WebMonitor接口线上检测平台
[本文出自天外归云的博客园] Auty 2017——WebMonitor接口检测平台 前篇 接口本地检测平台 本篇 接上篇,在本地检测平台的基础上,去掉本地服务,改功能为线上使用.好处是项目可以多人访 ...
- 在windows下nginx+django+flup python3
1.安装python 下载最新的python版本,在本文撰写时为 python 3.4, 下载地址:https://www.python.org/ftp/python/3.4.0/python-3.4 ...
- Android 两级菜单栏
这里来记录下,android 的两级菜单栏,就是顶部切换,和底部的切换.因为在这个上面整了太久的时间,所以特此记录下. 第一种: 先介绍一个网上别人写出来的效果吧,这个当时积分真的很高..CSDN30 ...
- C语言 · 错误票据
历届试题 错误票据 时间限制:1.0s 内存限制:256.0MB 锦囊1 排序. 锦囊2 把所有的编号排序,再扫描一遍数组,即可找到重复的和遗漏的. 问题描述 某涉密单位下发 ...