Juergen Kreileder wrote:
>>>>> Dimitris Vyzovitis writes:

    Dimitris> Hi everyone,
    Dimitris> It appears there is a nasty bug in a modal dialog's
    Dimitris> construction process.  If I subclass a modal dialog that
    Dimitris> appears in its constructor (ie the constructor ends with
    Dimitris> the typical pack(); show(); setResizable( false ); ),
    Dimitris> the subclass constructor doesn't get called unless the
    Dimitris> dialog is disposed.

This behavior is correct. show() on a modal dialog will block until
the dialog is hidden by calling hide() or dispose().

By the way: This means that your setResiable(false) will have no
effect because it won't get executed until the dialog is hidden.

Hmm,
this was the suggested workaround for a KDE related glitch (a modal non-resizable dialog doesn't appear under KDE, unless setResizable is called after pack and show).
And the situation isn't quite as you describe, since the dialog that appears (before the subclass constructor is actually executed) is not resizable.
Furthermore, how do you explain the fact that if I use the native threads, the subclass constructor is called?
I am not  sure that you are correct in your suggestion.
 

    Dimitris> What happens is that the message only appears after the
    Dimitris> dialog is disposed!!!!  This DOESN'T happen in windows,
    Dimitris> jdk1.1.7a (still there ;-} )

If show() doesn't block immediately on windows then it's a bug in
windows JDK.

 

A bug in every possible jdk implementation under windows (netscape, sun, microsoft)? Don't think so...
Just don't forget that windows implementations use native thraeds (and it behaves as expected with linuxthreads as well)

Cheers,
Dimitris.
 

-- 
Dimitrios Vyzovitis      -- Information Processing Laboratory
[EMAIL PROTECTED] -- Aristotle University of Thessaloniki
[EMAIL PROTECTED] -- Dept. of Electrical and Computer Engineering
                            http://egnatia.ee.auth.gr/~dviz
 


Reply via email to