• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem when multiple dialogs popped up at the same time?  RSS feed

 
David Chen
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, there:

I'm using JDK1.3.1 Swing. When application began, I have a thread spawn(actually, a timer task) which may pop up a modal dialog sometime later. And, from main application thread, I'll pop up another modal dialog as well. The problem is when both dialogs are popped up, those buttons like "OK", "Cancel" on dialogs did not work any longer. And the only way to leave is using mouse to click "X" at the right top of the dialog. Is that a bug in JDK1.3? And if so, does that bug get fixed in JDK1.4? Highly appreciated if anyone has any suggestion.

Thanks a lot
David
 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would expect some sort of problem when opening two modal dialogs at the same time. A modal dialog by definition grabs the focus and doesn't let go. If one opens two modal dialogs at the same time he is setting up a deadlock situation.
That said, I can tell you that using multiple JOptionPane's in JDK 1.5 works politely. The last dialog has the focus to the exclusion of previously opened dialogs.
 
David Chen
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Joe for quick reply. Actually, I just run the same testing code on JDK 1.4.2, everything works fine too. So, it seems JDK1.4 and later version did take care this issue(if not a bug).

David
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!