Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Paul Santa Maria
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • 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 ]
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • 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 ]
 
Martin Simons
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!