• Post Reply Bookmark Topic Watch Topic
  • New Topic

Two JDialogs with the same parent  RSS feed

 
Diueine Monteiro
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,

I found a very weird JDialog behavior in an application I am developing. It is a system which shots some events, modal JDialogs which pop up now and then fired by threads.
Sometimes two JDialogs are fired in the same time. The problem is: they show on the screen *together*, one over the other. Their parent is the same, the main JFrame, so they should appear one *after* the other, but it doesn't happen.

To make things worse, the JDialog in foreground allows editing (it has a JTextField and some buttons), but the buttons don�t work (???). The JDialog in the back cannot have focus because the focus is locked on the first JDialog.

Then my application blocks and I have to kill the process.

I tried to reproduce the situation artifitially in another test class, but it was fruitless, it just happen in my application. This leads me to think I am doing something wrong, but I have no clues.

If you have any suggestion...

Thanks in advance,

Diueine Monteiro
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See if this helps. It uses a synchronized method to make everyone wait their turn.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!