• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Two JDialogs with the same parent

 
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
 
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!