Article View: borland.public.jbuilder.java.swing
Article #1014Re: how to stop exiting
From: Tor Iver Wilhelmsen [TeamB]
Date: Mon, 06 Sep 2004 07:06
Date: Mon, 06 Sep 2004 07:06
10 lines
1341 bytes
1341 bytes
"andy dingfelder" <dingfeldera@landcareresearch.co.nz> writes: > How can I trap the exit icon (the upper right X) actions so that I > can do some logic first and under some conditions display a message > instead of exiting? Set the JFrame's default close operation to DO_NOTHING_ON_CLOSE, and add a WindowListener where you do your processing in windowClosing(). Remember to call hide() or System.exit() since you become responsible for actually closing the window.
Technical Details
Message-ID:
<usm9vswoz.fsf@broadpark.no>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<413bca93$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,76f888c29044beef X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Sender: Tor Iver Wilhelmsen@TIWILHEL Newsgroups: borland.public.jbuilder.java.swing Subject: Re: how to stop exiting References: <413bca93$1@newsgroups.borland.com> From: tor.iver.wilhelmsen@broadpark.no (Tor Iver Wilhelmsen [TeamB]) Date: 06 Sep 2004 09:06:36 +0200 Message-ID: <usm9vswoz.fsf@broadpark.no> Lines: 10 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 80.203.79.252 X-Trace: newsgroups.borland.com 1094454106 80.203.79.252 (6 Sep 2004 00:01:46 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail