How can I avoid, that a dialog is shown, when there already is one on the screen?
Details: In my application many Timers are running. If a fatal error occurs, all the affected threads are going to show a JDialog (by swingx.JXErrorPane.showDialog()), which is not desired. Even if I cancel all the running Timers, still some Dialogs will appear at the same time. How can I achieve that there will only appear one dialog?
I tried to make the method which calls showDialog() synchronized, which results in my whole GUI being blocked. Usage of a flag didn't work either.