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 ...
随机推荐
- [SQL in Azure] High Availability and Disaster Recovery for SQL Server in Azure Virtual Machines
http://msdn.microsoft.com/en-us/library/azure/jj870962.aspx Microsoft Azure virtual machines (VMs) w ...
- [Windows Azure] Developing Multi-Tenant Web Applications with Windows Azure AD
Developing Multi-Tenant Web Applications with Windows Azure AD 2 out of 3 rated this helpful - Rate ...
- 每日英语:China Destroys Six Tons of Confiscated Ivory
BEIJING—Chinese government officials destroyed more than six tons of ivory that had been illegally s ...
- Mathematica .nb程序运行不下去的原因
Mathematica是个不错的工具,尤其是其支持交互式参数调整的plot功能,灰常实用.但一直有个烦人的carveat,这里提一下. 在evaluate notebook(.nb)时,一旦碰到了使用 ...
- Linux下烧写工具DNW和USB驱动安装(一)
转:http://blog.csdn.net/zhengmeifu/article/details/8837930 Linux下编译记录:编译PC端USB驱动和写入工具dnw_linux.tgz压缩包 ...
- 在XSLT中输出内容带有CDATA的XML节点
http://www.cnblogs.com/jaxu/archive/2013/03/13/2956904.html **************************************** ...
- Mysql下SELECT的结果集作为UPDATE的WHERE条件时的SQL语法
UPDATE `WarningSendMail` AS alias_1 INNER JOIN (SELECT * FROM `WarningSendMail` WHERE flag=1 AND top ...
- js之获取url中"?"后面的字串
url : index.php?id=123 <script type="text/javascript"> function GetRequest() { var u ...
- JAVA-JSP内置对象之config对象
相关资料:<21天学通Java Web开发> config对象1.config对象可以用来获得Servlet的配置信息. 方法 ...
- git学习相关的博客地址
Git分支管理策略: http://www.ruanyifeng.com/blog/2012/07/git.html Git 使用规范流程: http://www.ruanyifeng.com/blo ...