Sergey Karpushin
Sergey Karpushin

Reputation: 874

How to handle JDialog opened after setVisible(false)?

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

Answers (1)

mKorbel
mKorbel

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()

  • more here

Upvotes: 3

Related Questions