Article View: borland.public.jbuilder.java.api
Article #2122Re: Unable to hide() modal Dialog
From: John McGrath TeamB
Date: Thu, 24 May 2001 05:59
Date: Thu, 24 May 2001 05:59
33 lines
2259 bytes
2259 bytes
On Wed, 23 May 2001 18:54:12 +0200, Maxim Golubitsky wrote:
> does somebody know why modal java.awt.Dialog appears again
> after hide(), dispose() or both of them? Only after second
> click on the button that calls method containing those
> functions the dialog disappears. In dialog.hide() javadoc
> written "Hides the Dialog and then causes show() to return
> if it is currently blocked." I think that catch is here,
> but don't understand what mean "blocked" and how to avoid
> it.
There is nothing that should cause a dialog to appear again, so I
assume that there must be an error in your code. But without seeing
the code, it is hard to say.
Blocked means that the show() or setVisible() call will not return
until the modal dialog is hidden. When a modal dialog is shown from
the event dispatch thread, it starts another event loop from within the
show() call and processes events until the dialog is closed. If it is
shown from another thread, the current thread will actually block until
the dialog is closed. In an earlier version (Java 1.1, I believe), the
AWT always blocked the current thread. When show() was called from the
event dispatch thread, it actually started another event dispatch
thread.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.15765aea7310a61198a219@forums.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3b0beb33_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,b1e1a9b3fa0a3583 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2001-05-23 23:16:01 PST From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.api Subject: Re: Unable to hide() modal Dialog Date: Thu, 24 May 2001 01:59:37 -0400 Message-ID: <MPG.15765aea7310a61198a219@forums.borland.com> References: <3b0beb33_1@dnews> X-Newsreader: MicroPlanet Gravity v2.30 NNTP-Posting-Host: 209.92.40.60 X-Trace: dnews 990683976 209.92.40.60 (23 May 2001 22:59:36 -0700) Lines: 33 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews