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:

use WindowAdapter

Posted by saddy on January 26, 2001 at 1:10 PM

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:
  • it worx!!! peeed January 29, 2001 at 5:24 AM (0)

Sponsored Links



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