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的更多相关文章

  1. RFC 2616

    Network Working Group R. Fielding Request for Comments: 2616 UC Irvine Obsoletes: 2068 J. Gettys Cat ...

  2. Android如何判断当前手机是否正在播放音乐,并获取到正在播放的音乐的信息

    我想实现如下的场景,判断当前Android手机上是否正在播放音乐,如果是,通过某个特定的手势, 或者点击某个按键,将当前我正在听的音乐共享出去. 第一步,就是判断当前是否有音乐正在播放. 最开始我想得 ...

  3. SAP NOTE 1999997 - FAQ: SAP HANA Memory

    Symptom You have questions related to the SAP HANA memory. You experience a high memory utilization ...

  4. Image Processing and Analysis_8_Edge Detection:Local Scale Control for Edge Detection and Blur Estimation——1998

    此主要讨论图像处理与分析.虽然计算机视觉部分的有些内容比如特 征提取等也可以归结到图像分析中来,但鉴于它们与计算机视觉的紧密联系,以 及它们的出处,没有把它们纳入到图像处理与分析中来.同样,这里面也有 ...

  5. oracle undo回滚段详解

    1.Undo是干嘛用的?   在介绍undo之前先说一下另外一个东西 transaction ,翻译成交易或事务.我们在进行一个事务的过程中需要申请许多资源,一个复杂的事务也需要很多步来完成.那么一个 ...

  6. http-code 未译

    1xx Informational Request received, continuing process. This class of status code indicates a provis ...

  7. How to DEBUG a trigger or procedure

    DEBUGGING STORED PROCEDURES Over the past several weeks, we’ve been working on debugging a stored pr ...

  8. 常见web服务器错误

    参考地址:http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5     10 Status Code Definitions ...

  9. 【技术贴】解决支付宝充值信用卡还款跳转到网上银行报错Error 404 - Not Found

    声明 : 本文在 GFDL 1.2 下发布,本文出处光大银行信用卡  http://bbs.090989.com/forum-186-1.html http://androidgao.blogspot ...

随机推荐

  1. Shell脚本判断内容为None的方式

    1.判断变量 read -p "input a word :" word if [ ! -n "$word" ] ;then echo "you ha ...

  2. [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 ...

  3. [Windows Azure] Create a Virtual Network for Site-to-Site Cross-Premises Connectivity

    Create a Virtual Network for Site-to-Site Cross-Premises Connectivity This tutorial walks you throug ...

  4. 每日英语:Can Robots Better Spot Terrorists at Airports?

    Next to have their jobs automated: airport-security screeners? Aviation and government authorities a ...

  5. 20、uwp打包失败(All app package manifests in a bundle must declare the same values under the XPath *[local-name()='Package']/*[local-name()='Dependencies'])

    在给 uwp工程打商店包的时候,遇到了一个异常: Error info: error 80080204: All app package manifests in a bundle must decl ...

  6. 如何矫正罗圈腿(O型腿)

    http://bbs.hupu.com/10787225.html 留着自个儿看

  7. 【ARM】2410裸机系列-按键查询式控制led

    开发环境   硬件平台:FS2410 主机:Ubuntu 12.04 LTS LED灯原理图 按键原理图 按键的接线资源 KSCAN0 -> GPE11    KSCAN1 -> GPG6 ...

  8. 【Linux技术】ubuntu常用命令

    查看软件xxx安装内容:dpkg -L xxx查找软件库中的软件:apt-cache search 正则表达式查找软件库中的软件:aptitude search 软件包查找文件属于哪个包:dpkg - ...

  9. idea 改变version control

    idea 当一个moudule拥有2个VCS的时候 如何切换其应用的VSC 如拥有 SVN 和 GIT 2个版本  ,想换回SVN则删除  git目录 将 version control  vcs 设 ...

  10. ASP.NET学习笔记(6)——jQuery的Ajax基本操作

    说明(2017-11-5 15:49:29): 1. jQuery里封装了三个方法,$.get,$.post和$.ajax,其中$.ajax是返回原生的XMLHttpRequest对象,一般只用前两个 ...