🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18079

Re: WINDOW_DESTROY

#18079
From: Steve
Date: Tue, 18 Aug 1998 00:00
73 lines
2361 bytes
This is a multi-part message in MIME format.
--------------E9940E4BCA276CDBB6909AD0
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit

Hi, Sam,

Here is the working code:

        addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });

This method is called from the class that extend Frame instance.

Sure this must help,
                                                   Steve

PS: u as well can write inner class that extend WindowAdapter lately in
code. This one is used anonymous Inner class.



Sam C. King wrote:
> 
> Deprecation:  it is now wrong to use this simple code:
> 
> public boolean handleEvent (Event event)
> {
> 
> if ( event.id == Event.WINDOW_DESTROY )
>    {
>    setVisible(false);
>    dispose();
>    return true;
>    }
> return super.handleEvent( event );
> }
> 
> The deprecation warning comes from the last line:
> return...handleEvent....
> 
> So, what are you suppose to do?  There are no working
> examples that I can find.  I found the section on
> WINDOW_CLOSING, but there is just some obscure
> instructions and never the courtsey of a small
> working example.
> Thanks
> Sam   samcking@olypen.com
--------------E9940E4BCA276CDBB6909AD0
Content-Type: text/x-vcard; charset=koi8-r;
 name="acidsteve.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Steve
Content-Disposition: attachment;
 filename="acidsteve.vcf"

begin:vcard
n:Olenin;Vladimir
x-mozilla-html:FALSE
org:
adr:
version:2.1
email;internet:acidsteve@hempseed.com
title:Card
note:Java programmer. Open for projects development offers.
fn:Vladimir Olenin
end:vcard


--------------E9940E4BCA276CDBB6909AD0--
Technical Details
Message-ID: <35D8C40B.E0A05388@hempseed.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35D62AB5.AA1E49A1@olypen.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,d9eed9202e751080
X-Google-Attributes: gidf74b3,public
From: Steve <acidsteve@hempseed.com>
Subject: Re: WINDOW_DESTROY
Date: 1998/08/18
Message-ID: <35D8C40B.E0A05388@hempseed.com>
X-Deja-AN: 382127391
References: <35D62AB5.AA1E49A1@olypen.com>
X-Accept-Language: ru
Content-Type: multipart/mixed; boundary="------------E9940E4BCA276CDBB6909AD0"
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language