当前位置: 技术问答>java相关
请问在如何在当前的JFrame失去焦点后,产生一个事件?
来源: 互联网 发布时间:2015-05-18
本文导语: 比如在后台的打印一句话,好象用focuslistener不行,请高手指教。 | this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowDeactivated(WindowEvent e) { System.out.println("Lost foc...
比如在后台的打印一句话,好象用focuslistener不行,请高手指教。
|
this.addWindowListener(new java.awt.event.WindowAdapter()
{
public void windowDeactivated(WindowEvent e)
{
System.out.println("Lost focus");
}
});
{
public void windowDeactivated(WindowEvent e)
{
System.out.println("Lost focus");
}
});