Harsha Godugu asked me to raise this escalation.
We have the following problem concerning modal dialogs:
In our telephony client application we have a window for the configuration of the settings. So there is our client in one window and the settings in another. In case of invalid user input or warnings we have to show dialogs on the settings window. This dialogs must block the settings window but not the window of the telephony client. If the client would also be blocked the user could not accept phone calls during the time the settings window was displaying a dialog.
So what we are looking for is a modal dialog which is blocking only a certain window but the other window(s) are not concerned. We were trying to get a solution by using threads but were not successful in the end.
-------
The suggestion to use disable() respectively setEnabled(false) is not new
for us. We tried this already.
There are two problems with it:
1) Our settings frame contains quite a lot of swing elements so disabling
and enabling it causes it to flicker quite much...
(You can't see this effect in your example as it doesn't contain much.)
2) We need a dialog behaving like a modal dialog concernig the returning of
the show() method so the show() method returns when the dialog is closed.
(Using window listeners is not possible, as we need the data entered in the
dialog respectively the answer which button was pressed immedialtly after
showing the dialog.)
DESCRIPTIONEND
TESTCASEBEGIN
Finally I created a example to show the flickering.
I couldn't give you our source code because you would need to make a
complete installation.
You can choose to show a Modal Dialog (--> modal JDialog) or a Semi Modal
Dialog (--> non-modal JDialog using setEnabled() for blocking certain
window).
<> You'll see that showing the Modal Dialog doesn't flicker at all while
showing the Semi Modal Dialog does.
The bigger the Semi Modal Dialog is (in size and I think also in the number
of components it contains) the worse the visual effect gets.
Our real SettingsFrame contains quite a lot of components which effects in
quite a lot of "flickering"
-----
Originally the problem was to have a Modal Dialog specific to a particular window in an Application with Multiple windows. This can be achieved by using
the java.awt api setEnabled (boolean t) . This is the work around to the initial problem. This work around causes large amount of flickering which is not
acceptable to Customer. The flickering is caused by the side effect of the fix for Bug # 4038881. This happens on windows.
Action(s):
Sustaining:
- To investigate the fix & the side effects of the fix for bug 4038881.
Could not set the "Release" should be Java 1.2.2_x, 1.3.x