[stringtemplate-interest] [ST4 Beta-2] Closing the STViz Inspect Window exits the application
Terence Parr
parrt at cs.usfca.edu
Wed Jan 26 18:01:51 PST 2011
setting to JFrame.DISPOSE_ON_CLOSE.
will push 4.0b3 tomorrow
Ter
On Jan 26, 2011, at 12:33 PM, Udo Borkowski wrote:
> Making the DefaultCloseOperation for the STViewFrame a parameter of STViz is fine with me.
>
> However I think it is not necessary.
>
> DISPOSE_ON_CLOSE is at least as "safe" as EXIT_ON_CLOSE, in typical Swing applications even "safer". The documentation for DISPOSE_ON_CLOSE states:
>> When the last displayable window within the Java virtual machine (VM) is disposed of, the VM may terminate. See <a href="../../java/awt/doc-files/AWTThreadIssues.html"> AWT Threading Issues</a> for more information.
>
> So one would not inadvertantly leave the jvm running just by using the DISPOSE_ON_CLOSE option. On the opposite using the EXIT_ON_CLOSE may inadvertantly quit the jvm, even if there exist other displayable windows. This may lead to data loss.
>
> But as I said initially, a parameter is fine with me.
>
> Udo
More information about the stringtemplate-interest
mailing list