How can stop duplicate of JDialog
opening up upon clicking JButton
twice or more?
Asked
Active
Viewed 938 times
0

mKorbel
- 109,525
- 20
- 134
- 319

user1708134
- 643
- 1
- 9
- 21
-
not wrong desing, not good idea, create only one `JDialog` and re_use for next event from `JButton` – mKorbel Oct 06 '12 at 21:51
1 Answers
5
You can:
Make that dialog modal.
Use a
boolean
flag to indicate whether the dialog was already opened or not. Set when opening, clear when dialog is closed.

Tomasz Nurkiewicz
- 334,321
- 69
- 703
- 674