怎样在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的界面开发没有前途了