java - close the application buttonListener -
i writing client gui server program. gui , component buttons in class extends jframe.
what need button listener tells server message in event client hits close button on jframe gui.
i know
setdefaultcloseoperation(exit_on_close); will terminate application if button pressed, can't notify server before program terminates.
use in class
windowadapter wa = new windowadapter() { public void windowclosing(windowevent we) { /*inform server*/ } }; addwindowlistener(wa);
Comments
Post a Comment