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:
|