• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How the heck do you wait for a Frame to exit???

 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi -

I've got an unusual requirement where I'm programming for a 1.1 JDK (yup: I'm using "java.awt", not "javax.swing"), I need to pop up a graphical dialog, and then wait for the dialog to complete before I exit the function.

The code looks something like this:

The GUI, "ReserveUi", looks like this:

QUESTION:
Is there any easier way I can get function "xqt()" to pause and wait for the frame to close, without creating my own semaphore object (like I did above)?

Thanx in advance .. PSM

PS:
No, unfortunately I can't simply use a modal dialog. I'm actually not sure if that would work anyway, even if I could...
[ June 18, 2006: Message edited by: Paul Santa Maria ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If this happens in two separate threads, you could use the wait/notify/notifyAll mechanism.
[ June 19, 2006: Message edited by: Ulf Dittmer ]
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why can you not use a modal dialog? Extend Dialog instead of frame and
provide for the owner reference. Then the modal
function of a modal dialog would work, and you can do everything that you
could in a Frame.
 
reply
    Bookmark Topic Watch Topic
  • New Topic