当前位置: 代码迷 >> J2SE >> 怎么在JAVA中判断是否激活
  详细解决方案

怎么在JAVA中判断是否激活

热度:14   发布时间:2016-04-24 13:53:37.0
怎样在JAVA中判断是否激活?
怎样在JAVA中判断是否激活?

谢谢!!各位!!急!!

------解决方案--------------------
不知道楼主指的是 "焦点 ",还是 "活动 "
addWindowFocusListener(new WindowFocusListener() {
public void windowGainedFocus(WindowEvent event) {
System.out.println( "windowGainedFocus ");
System.out.println(isFocused());
System.out.println(isActive());
}
public void windowLostFocus(WindowEvent event) {
System.out.println( "windowLostFocus ");
System.out.println(isFocused());
System.out.println(isActive());
}
});
楼主参考一下吧
------解决方案--------------------
java的界面开发没有前途了
  相关解决方案