Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35460

Re: How do I terminate a JVM properly?

Path csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: How do I terminate a JVM properly?
Date Thu, 25 Aug 2016 15:55:40 -0400
Organization A noiseless patient Spider
Lines 22
Message-ID <npnig2$jgv$1@dont-email.me> (permalink)
References <dd3f22ed-83df-4f1d-8a4a-180fa6ee12c2@googlegroups.com> <10fc56da-c03f-41a7-93b8-c7eeb6d24279@googlegroups.com> <npl47i$1ps$1@dont-email.me> <7b27f662-d2e0-4649-8e4d-5e14e790bd14@googlegroups.com> <e287viFdr8sU1@mid.individual.net> <4fe5062e-9db3-4e91-9cfb-deeb8d51461a@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Thu, 25 Aug 2016 19:55:46 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="66c83a1a937e46f9983693b9a8244eb0"; logging-data="19999"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hLjsGqG3dV0Iz1taoWVRb"
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
In-Reply-To <4fe5062e-9db3-4e91-9cfb-deeb8d51461a@googlegroups.com>
Cancel-Lock sha1:F6UXFKKGyYm0XscMCAogIpKgu7I=
Xref csiph.com comp.lang.java.programmer:35460

Show key headers only | View raw


On 8/25/2016 9:05 AM, Eric Douglas wrote:
> On Thursday, August 25, 2016 at 8:52:12 AM UTC-4, Nigel Wade wrote:
>> In your original post you stated that:
>> "After I dispose the last GUI object the JVM should terminate itself."
>>
>> Indeed it should. But where exactly, in the code below, do you dispose of the GUI objects you've created?
>> (FYI, close != dispose).
>>
>> The EDT will not exit as long as there are displayable components left which the JVM is managing.
>> (displayable != visible).
>
> It appears to destroy the window when you click the X.  DISPOSE_ON_CLOSE is not the default?
> [...]

     Nigel's nailed it.  Quoth the Javadoc for JDialog: "The value is
set to HIDE_ON_CLOSE by default."  (You've got to hunt a bit for it:
The text is not in the "up front" material for the class, the way it
is for JFrame, but down in the setDefaultCloseOperation() description.)

-- 
esosman@comcast-dot-net.invalid
The Tooth Fairy has gone high-tech, now pays in Bitecoin.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-24 08:14 -0700
  Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-24 14:00 -0700
    Re: How do I terminate a JVM properly? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-24 17:39 -0400
      Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-25 05:24 -0700
        Re: How do I terminate a JVM properly? Nigel Wade <nmw@local.domain> - 2016-08-25 13:52 +0100
          Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-25 06:05 -0700
            Re: How do I terminate a JVM properly? Nigel Wade <nmw@local.domain> - 2016-08-25 15:04 +0100
              Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-25 08:20 -0700
            Re: How do I terminate a JVM properly? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-25 15:55 -0400
              Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-25 13:35 -0700
                Re: How do I terminate a JVM properly? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-25 16:58 -0400
                Re: How do I terminate a JVM properly? Arne Vajhøj <arne@vajhoej.dk> - 2016-08-28 13:29 -0400
                Re: How do I terminate a JVM properly? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-28 13:53 -0400
                Re: How do I terminate a JVM properly? Arne Vajhøj <arne@vajhoej.dk> - 2016-08-28 14:14 -0400
        Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-25 05:52 -0700
    Re: How do I terminate a JVM properly? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-24 18:19 -0400
    Re: How do I terminate a JVM properly? Lew <lewbloch@gmail.com> - 2016-08-24 16:12 -0700
    Re: How do I terminate a JVM properly? Roedy Green <inquiry@mindprod.com> - 2016-08-30 16:34 -0700

csiph-web