Reputation: 61
I have a custom Java Swing application that displays its content in two separate and independent JFrames
. How can I determine if one of my frames - or any displayable Java component in gereneral - is actually really visible on screen? I am speaking of "real visibility" in the meaning that I can actually see it.
Example: my application has been made visible using setVisible(true)
, but when I move any other window or application in front of my application, it gets hidden behind that new window and I am no longer able to see it.
I have used: frame.isVisible()
, frame.isShowing()
and frame.isDisplayable()
.
All three evaluate to true
no matter if my JFrame
is actually visible on top of the screen, minimized in the task bar or hidden behind any other window.
Upvotes: 1
Views: 230