Coder's Guild Mailing List

windowlistener

Posted by Eugene Teo on 1999-07-18

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Have the class implement a WindowListener.  You have to define 6
methods 
suchas windowClosed, windowClosing, etc...  In the window closing
method 
you have to say something like this.setVisible(false);
this.destroy();
and the window will close when you hit the little 'x' in the top
right 
hand corner.  

All of the awt event listeners are defined in the java.awt.event 
package.  You can look up the exact methods you need to define in the
API 
spec.  If you don't have a book, there is one on line at java.sun.com

Steve

I should get that using Listener methods certainly makes the program
easiler.
inner classes makes it Even more easiler!
- --
Eugene Teo H. H.
Singapore Linux Portal (SLP) http://linux.com.sg
Member, Linux User Group Singapore (LUGS)
Email: amnesia@xxxxxxxxxx.xxx, amnesia@xxxxxxxx.xxx
URL: http://amnesia.home.dhs.org/, http://amnesia.dhs.org/
PGP Public Key: http://amnesia.home.dhs.org/amnesia_pgp.txt


-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.0.2i

iQA/AwUBN5F+clkfIvvV/iBCEQIKXQCgtm1OH5yoMp3uukITBJr4QwKh05kAoNpa
7KR4NmGR24P5/PACR/JCnn3B
=6I2i
-----END PGP SIGNATURE