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. 深入云存储系统Swift核心组件:Ring实现原理剖析

    http://www.cnblogs.com/yuxc/archive/2012/06/22/2558312.html 简介 OpenStack是一个美国国家航空航天局和Rackspace合作研发的开 ...

  2. Java Hex 16进制的 byte String 转换类

    package mobi.dzs.android.util; import java.util.Locale; /** * 16进制值与String/Byte之间的转换 * @author Jerry ...

  3. 单独的 python 脚本文件使用 django 自带的 model

    django1.9.5&python3.4.4 文件结构 在一个爬虫脚本中将爬取的数据通过django自带的model保存到数据库   修改的文件(其余pycharm新建Django项目生成, ...

  4. Fiddler filter 过滤隐藏css、js、图片等

    REGEX:(?insx)/[^\?/]*\.(css|ico|jpg|png|gif|bmp|wav|js|jpeg)(\?.*)?$ Fiddler教程 http://www.jianshu.co ...

  5. 使用线性回归识别手写阿拉伯数字mnist数据集

    学习了tensorflow的线性回归. 首先是一个sklearn中makeregression数据集,对其进行线性回归训练的例子.来自腾讯云实验室 import tensorflow as tf im ...

  6. pandas的学习总结

    pandas的学习总结 作者:csj更新时间:2017.12.31 email:59888745@qq.com 说明:因内容较多,会不断更新 xxx学习总结: 回主目录:2017 年学习记录和总结 1 ...

  7. java基础篇---枚举详解

    在JDK1.5之前,JAVA可以有两种方式定义新类型:类和接口,对于大部分面向对象编程,有这两种似乎就足够了,但是在一些特殊情况就不合适.例如:想要定义一个Color类,它只能有Red,Green,B ...

  8. 操作Excel文件--java

    java操作Excel首先要导入 JExcelAPI JExcelAPI是一套纯粹使用JAVA开发出来的Excel表格操作组件,本身并不与特定的操作系统进行绑定,可以在不同的操作系统上对Excel文件 ...

  9. Gnome3 安装系统监视器

    . . . . . 之前使用Gnome2的时候可以向面板上添加一个系统监视器,相信很多人都用过这个实用的小工具,可以很方便的了解系统的运行概况.但是自从使用了Gnome3之后这个小工具不见了,Gnom ...

  10. hbase的写和读,大合并和小合并

    Hbase写: 客户端向hbase服务器端发送写的请求时,hbase会同时进行两个动作,把记录写在WAL(write ahead log)日志文件中,每台服务器所有表都共享这个WAL文件.然后会写到m ...