🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Window closing

#11933
From: Frank Packenham
Date: Tue, 16 Mar 1999 00:00
27 lines
1358 bytes
So every window recieves the event, no matter which one has the focus!?

surely this is uneccessarily slow - is this the case with all events??

-------
Frank Packenham
Senior Analyst/Developer
NeuroFlex Pty Ltd.

*snip*

>Each window's windowClosing event handler should ask which window
>is the source of the event.  If not "this" window, ignore the event
>by not hiding the window.  
>
>It should go something like this:
>
>  public void windowClosing(WindowEvent e) {
>    if ( e.getSource() == this )
>      this.setVisible(false);
>  }
>
>[I don't have the PC on so the above is from memory, but it's
>close to what you want.]
>
>
>Paul Furbacher
Technical Details
Message-ID: <7cklgb$30f11@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36ED5340.59DD4EA5@cs.virginia.edu> <36EDD25E.E0EF0EE4@bilbo.bio.purdue.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,9db34235e6d2af09
X-Google-Attributes: gid111d45,public
From: "Frank Packenham" <frank@NeuroFlex.com>
Subject: Re: Window closing
Date: 1999/03/16
Message-ID: <7cklgb$30f11@forums.borland.com>
X-Deja-AN: 455492762
Content-Transfer-Encoding: 7bit
References: <36ED5340.59DD4EA5@cs.virginia.edu> <36EDD25E.E0EF0EE4@bilbo.bio.purdue.edu>
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
X-Priority: 3
Content-Type: text/plain; charset="Windows-1252"
Mime-Version: 1.0
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800
Newsgroups: borland.public.jbuilder.java.swing