isVisible() problem
843804Jan 27 2005 — edited Jan 27 2005A quick summary of my problem. I have a JPanel with a button that launches another window (JFrame), and I want to check whether this second panel is visible when a button is pressed on the first panel. So I have added an isVisible() check on the button. I then perform the following tests:
1. Press the button - isVisible() returns false
2. Open the 2nd window and press the button - isVisible returns true.
3. Dismiss the 2nd frame (using either the 'x' or "close" menu item) , then press the button - isVisible() still returns true.
The 2nd window has the default close operation set to DISPOSE_ON_CLOSE. So my question is why does case 3 still return true? Note I can not replicate this in a simple example I don't think, so there must be something else going on, but don't know where to look.