KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Which kind of listener do I have to add to a JFrame to detect when it is being hidden or shown via setVisible ? I tried using a WindowListener and the windowOpened and windowClosed methods, but they only work for the first time that a window is opened ( windowOpened ) or, respectively, when the window is closed using the dispose method ( windowClosed ). That is not enough for me. I want to be notified every time the window is made visible and invisible on the screen using setVisible . Is there a standard Swing way to achieve this, or do I need to make my own (by, say, overriding the setVisible method)?
Tags (comma-separated)
Save Edits
Cancel