Article View: borland.public.jbuilder.java.language
Article #8743Re: What keeps a window alive?
From: Greg Safford
Date: Thu, 01 Mar 2001 14:31
Date: Thu, 01 Mar 2001 14:31
46 lines
2287 bytes
2287 bytes
Thanks. That gets me started. "Torsten Welches" <torsten.welches@who.cares.netcologne.de> wrote in message news:3a9dee26$1_2@dnews... > > Greg, > > no, a Frame does not automatically die as soon as the main method > ends. The Virtual Machine will stop when all (non-daemon) > threads are finished. > Frames run inside the event dispatch thread, which is > automatically started for you if you use any ui stuff. > So although the main method terminates are there still non- > daemon threads alive - the program keeps running. > > I have no reference handy apart from the Virtual Machine > Specification: > http://java.sun.com/docs/books/vmspec/2nd-edition/html/Concepts.doc.html#191 52 > > Torsten > > "Greg Safford" <gsafford@springmail.com> wrote: > >I see lots of Java applications that directly or indirectly create a window > >(say by instantiating a class derived from JFrame). Since the frame object > >is created in the scope of the main() method, I'd expect the frame object to > >be destroyed when the main() method returns. However, it is plain that this > >does not happen; the frame window remains until closed, as if a reference to > >it were being kept in some global collection. > > > >Can anyone point me to a reference explaining what keeps such an object > >alive? > > > >TIA > > > >Greg Safford > > > > >
Technical Details
Message-ID:
<97lmoh$jbf8@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mailReferences:
<97jmkg$kol3@bornews.inprise.com> <3a9dee26$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,944d3adb1ffb387d X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-03-01 06:50:09 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail From: "Greg Safford" <gsafford@springmail.com> Newsgroups: borland.public.jbuilder.java.language Subject: Re: What keeps a window alive? Date: Thu, 1 Mar 2001 09:31:19 -0500 Organization: Another Netscape Collabra Server User Lines: 48 Message-ID: <97lmoh$jbf8@bornews.inprise.com> References: <97jmkg$kol3@bornews.inprise.com> <3a9dee26$1_2@dnews> NNTP-Posting-Host: pc20085.wkap.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400