Article View: borland.public.jbuilder.java.swing
Article #1017Re: Launch a Window closing Event
From: John McGrath [TeamB]
Date: Mon, 06 Sep 2004 09:10
Date: Mon, 06 Sep 2004 09:10
28 lines
1802 bytes
1802 bytes
On 8/17/2004 at 5:15:05 PM, rr wrote:
> I would like to do a Frame Selection, to select e.g: Cars
> I have created a Class that extends Frame and implements ActionListener.
> What must I do to launch WindowClosing event when I have selected a row
> from my list.
>
> I have tried
> this_windowClosing(null);
> but the frame does not close. I would like to close using the window
> closing event
>
> Perhaps it would be better close the selection without using
> windowClosing, using the mouseClick event and call dispose,wouldn't it?
The WindowListener interface is for notification - it lets you know that
some event has occurred, but you cannot use it to close the window.
To close the window, call dispose() on it.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<413c297b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<opscwanfg7rudah6@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,2b20761b0c7cf6b9 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit From: "John McGrath [TeamB]" <ng-b@JPMcGrath.net> Subject: Re: Launch a Window closing Event Newsgroups: borland.public.jbuilder.java.swing References: <opscwanfg7rudah6@newsgroups.borland.com> User-Agent: XanaNews/1.16.4.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 NNTP-Posting-Host: 141.158.35.112 Message-ID: <413c297b@newsgroups.borland.com> Date: 6 Sep 2004 02:10:19 -0700 X-Trace: newsgroups.borland.com 1094461819 141.158.35.112 (6 Sep 2004 02:10:19 -0700) Lines: 28 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail