Dialog objects created with modal = true are indeed modal, but there is no defined way for the creating thread to block and wait for the user to enter the desired input.
Though you can create modal dialogs, they are not currently useful for anything. This is causing significant problems and delays in the implementation of new HotJava features.
The description field as copied from bug report 1228840 follows:
The FileDialog.show() method will block until the user has chosen a file.
I can't figure out any way to write my own dialog (e.g., subclassed from
Dialog) that will similarly block until dismissed by the user.
I've tried using threads in many different combinations, but if I block
the main thread waiting for the dialog thread, events don't get handled.
Without this capability, I can't write a confirmation dialog that blocks
waiting for the user to choose Yes or No. It's way too difficult to
structure my application into pre-confirmation parts and event driven
post-confirmation parts. It sure seems like threads should allow me to
solve this problem, but I just can't figure out how.
Though you can create modal dialogs, they are not currently useful for anything. This is causing significant problems and delays in the implementation of new HotJava features.
The description field as copied from bug report 1228840 follows:
The FileDialog.show() method will block until the user has chosen a file.
I can't figure out any way to write my own dialog (e.g., subclassed from
Dialog) that will similarly block until dismissed by the user.
I've tried using threads in many different combinations, but if I block
the main thread waiting for the dialog thread, events don't get handled.
Without this capability, I can't write a confirmation dialog that blocks
waiting for the user to choose Yes or No. It's way too difficult to
structure my application into pre-confirmation parts and event driven
post-confirmation parts. It sure seems like threads should allow me to
solve this problem, but I just can't figure out how.
- relates to
-
JDK-1242310 Win32: cannot create a Modal dialog
- Closed