Frame[] allFrames = Frame.getFrames();
For open windows test each one with isVisible()
isVisible()
For front window test with isFocused()
isFocused()