Application close icon ('X')

Greetings all,I am new to this forum and relatively new to Java.I would like to bind a member function to the application close icon (The 'X' in the upper right hand corner of the applications main window). Does anyone know how to do
[297 byte] By [javaroba] at [2007-10-3 12:03:01]
# 1

> I would like to bind a member function to the

> application close icon (The 'X' in the upper right

> hand corner of the applications main window).

>

>Does anyone know how to do this?

Create a WindowAdapter and override the windowClosing event to call the method you want. Then do

Window w = ...

w.addWindowListener(myListener);

tjacobs01a at 2007-7-15 14:39:54 > top of Java-index,Java Essentials,New To Java...
# 2
Stop posting every question multiple times. It's very inconsiderate.
jverda at 2007-7-15 14:39:54 > top of Java-index,Java Essentials,New To Java...