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. EF框架 对字段属性为NULL的空值处理 类型前面加上?保证EF列表读取显示数据不会报异常

    譬如: public int? FlowStatus { get; set; } public DateTime? UpdateTime { get; set; }

  2. 重复代码检查工具simian的基本用法

    simian是一个检查重复代码的工具,支持通过命令行和UI方式来检查代码,可以检查多种语言(比如C\C++, java, c#等)的代码,常见的编程语言都支持,下面先来看看如何使用命令行来检查c++重 ...

  3. linux如何查看一个进程的堆栈

    转自:http://blog.csdn.net/nanjingligong/article/details/8624739 方法一:pstack pidNAME       pstack - prin ...

  4. Lua中的loadfile,dofile,require使用,最后还有调试

    1.loadfile---只编译,不运行. loadfile编译代码成中间码并且返回编译后的chunk作为一个函数,而不执行代码:另外loadfile不会抛出错误信息而是返回错误代号. loadstr ...

  5. zabbix_agentd在windows上安装

    zabbix_agentd在Windows环境内客户端的安装与管理 1)   在目标机器上C:\windows目录下新建一个目录,如zabbix_agent: 2)   将zabbix_agent软件 ...

  6. zoj 3762(求三角形的最大高)

    给出n个点,要你找到一个三角形,它的高是最长的. 思路:暴力超时了,是用先找出n个点与其他点的最长边,再枚举顶点过的.......具体证明不知道..... #include<algorithm& ...

  7. 基于html5顶部导航3D翻转展开特效

    基于html5顶部导航3D翻转展开特效是一款基于jQuery+HTML5实现的3D翻转网站导航菜单代码.效果图如下: 在线预览   源码下载 实现的代码. html代码: <header cla ...

  8. 【转】如何使用visual studio将你的程序打包成安装包

    原文地址:https://www.cnblogs.com/SolarWings/p/6132310.html 很久很久以前,我一直有一个梦想,那就是做出一个自己的游戏,这个游戏很像模像样,除了拥有一个 ...

  9. git pull出现There is no tracking information for the current branch

    使用git pull 或者 git push 的时候报错 gitThere is no tracking information for the current branch. Please spec ...

  10. java的几种对象(PO,VO,DAO,BO,POJO)解释 【转】

    java的几种对象(PO,VO,DAO,BO,POJO)解释     一.PO:persistant object 持久对象,可以看成是与数据库中的表相映射的java对象.最简单的PO就是对应数据库中 ...