Reputation: 874
This is the scenario:
How do I handle situation when my modal dialog appeared on the screen whenever it was first time or subsequent times I called setVisible(true) ?
Upvotes: 1
Views: 844
Reputation: 109823
How do I handle situation when my modal dialog appeared on the screen whenever it was first time or subsequent times I called setVisible(true) ?
have to use ComponentListener, and to override methods componentHidden() and componentShown()
JComponent must returns true from isDisplayable()
Upvotes: 3