e616. Determining If a Focus Lost Is Temporary or Permanent
A temporary focus-lost event occurs if the focus moves to another window. It's temporary because the component will gain the focus when its window becomes active again.
A permanent focus-lost event occurs if the focus moves to another component in the same window.
An example where this distinction might come in handy is in text field validation; a text field might not validate its contents in the case of a temporary loss of focus.
component.addFocusListener(new MyFocusListener());
public class MyFocusListener extends FocusAdapter {
public void focusGained(FocusEvent evt) {
// The component gained the focus.
}
public void focusLost(FocusEvent evt) {
// The component lost the focus.
boolean isTemporary = evt.isTemporary();
}
}
| Related Examples |
e616. Determining If a Focus Lost Is Temporary or Permanent的更多相关文章
- RFC 2616
Network Working Group R. Fielding Request for Comments: 2616 UC Irvine Obsoletes: 2068 J. Gettys Cat ...
- Android如何判断当前手机是否正在播放音乐,并获取到正在播放的音乐的信息
我想实现如下的场景,判断当前Android手机上是否正在播放音乐,如果是,通过某个特定的手势, 或者点击某个按键,将当前我正在听的音乐共享出去. 第一步,就是判断当前是否有音乐正在播放. 最开始我想得 ...
- SAP NOTE 1999997 - FAQ: SAP HANA Memory
Symptom You have questions related to the SAP HANA memory. You experience a high memory utilization ...
- Image Processing and Analysis_8_Edge Detection:Local Scale Control for Edge Detection and Blur Estimation——1998
此主要讨论图像处理与分析.虽然计算机视觉部分的有些内容比如特 征提取等也可以归结到图像分析中来,但鉴于它们与计算机视觉的紧密联系,以 及它们的出处,没有把它们纳入到图像处理与分析中来.同样,这里面也有 ...
- oracle undo回滚段详解
1.Undo是干嘛用的? 在介绍undo之前先说一下另外一个东西 transaction ,翻译成交易或事务.我们在进行一个事务的过程中需要申请许多资源,一个复杂的事务也需要很多步来完成.那么一个 ...
- http-code 未译
1xx Informational Request received, continuing process. This class of status code indicates a provis ...
- How to DEBUG a trigger or procedure
DEBUGGING STORED PROCEDURES Over the past several weeks, we’ve been working on debugging a stored pr ...
- 常见web服务器错误
参考地址:http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5 10 Status Code Definitions ...
- 【技术贴】解决支付宝充值信用卡还款跳转到网上银行报错Error 404 - Not Found
声明 : 本文在 GFDL 1.2 下发布,本文出处光大银行信用卡 http://bbs.090989.com/forum-186-1.html http://androidgao.blogspot ...
随机推荐
- 采用Oracle的dbms_obfuscation_toolkit的加密
create or replace function MD5 (vpassword in varchar2) return varchar2 is retval varchar2(32); begin ...
- 每日英语:How to Save Detroit
Detroit is beautiful-though you probably have to be a child of the industrial Midwest, like me, to s ...
- 每日英语:A Chinese Father’s Most Important Job
When it comes to parenting, Chinese fathers say the most important role they play is that of the fam ...
- KVM虚拟机的xml配置文件
在RHEL6中,用于从磁盘启动的XML文件 这里以dcs01.xml为例: <domain type='kvm'><name>dcs01</name><uui ...
- 三者互ping,PC,虚拟机,uboot,nfs网络文件系统搭建
要想实现三者互ping,韦老师虽然专门出了视频说明,但是在自己配置过程还是出现了问题,这里记录一下解决办法,虽然我也不知道原因,但是解决了出现的问题也实现了三者互ping. 首先,我的硬件设备是PC通 ...
- tf.placeholder
tf.placeholder placeholder( dtype, shape=None, name=None ) 功能说明: 是一种占位符,在执行时候需要为其提供数据 参数列表: 参数名 必选 类 ...
- Mybatis之工作原理
1.Mybatis的架构 1.1 Mybatis的框架分层 1.2 MyBatis的实现原理 mybatis底层还是采用原生jdbc来对数据库进行操作的,它支持定制化 SQL.存储过程以及高级映射的优 ...
- oracle的db link
cd $ORACLE_HOME/network/admin vi tnsnames.ora 添加 CCPBS_19 = (DESCRIPTION = (ADDRESS_LIST = ...
- golang包管理的取巧
常见的golang的包管理工具 glide 使用yaml做配置,语义化版本管理,可以设置镜像,下载x系列库,但是x系列库被第三方库依赖时会出现下载失败. dep 亲儿子,语义化版本管理,无法解决墙 v ...
- java框架篇---Struts入门
首先理解Struts与MVC的关系 在传统的MVC模式中所有的请求都要先交给Servlet处理,之后由Servlet调用JavaBean,并将结果交给JSP中进行显示.结构图如下 Struts是Apa ...