The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

it worx!!!

Posted by peeed on January 29, 2001 at 5:24 AM

I tried and it worked fine! Thanks a lot for your help! The WindowClosingadapter() method I know from a book I'm reading to learn Java.

> use WindowAdapter class instead of WindowClosingAdapter() i have never heard of such a class or method
> there is a method
> public void windowClosing(WindowEvent we)
> we should implement if implementing WindowListener Interface or
> override if using WindowAdapter class

> the comple code could be:

> myWindow.addWindowListener(new WindowAdapter()
> {
> public void windowClosing(WindowEvent we)
> {
> System.exit(1);
> }
> });

> where myWindow is object of the class extending Frame
> i hope this should help u
> Thanx
> saddy
> > I wrote a Java application and used awt. I build a window and want to close it, so I added an WindowListener that calls a WindowClosingAdapter() I wrote myself. By compiling the app I got the error that my WindowClosingAdapter was not found. Can anyone help me where I have to put it(directory/Path)? Thanks





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us