🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #335

Re: stopping window close event

#335
From: Kevin Dean [TeamB]
Date: Thu, 18 Aug 2005 02:49
28 lines
1795 bytes
dingfelder wrote:

> How can I make it NOT exit?

A crude way to do it is throw an exception; that's the only thing I
know of that stops a window closing event.

If you want to take control of the closing event, then you can do the
following:

myFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

and then write code elsewhere (e.g. in a button handler) that calls
either hide() or dispose(), depending on what you want to do with the
frame when you're done.

-- 
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <xn0e6466c3cv4b002-kdean@www.teamb.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <43018137$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,18e74e2743c5a2cd
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Kevin Dean [TeamB]" <NkOdSePaAnM@datadevelopment.com>
Subject: Re: stopping window close event
Newsgroups: borland.public.jbuilder.java.swing
References:  <43018137$1@newsgroups.borland.com>
Organization: Dolphin Data Development Ltd.
User-Agent: XanaNews/1.17.5.9
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobrp]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
Message-ID: <xn0e6466c3cv4b002-kdean@www.teamb.com>
X-Ref: newsgroups.borland.com ~XNS:000002C1
NNTP-Posting-Host: 24.57.153.235
Date: 17 Aug 2005 19:49:57 -0700
X-Trace: newsgroups.borland.com 1124333397 24.57.153.235 (17 Aug 2005 19:49:57 -0700)
Lines: 28
X-Authenticated-User: kdean
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail