The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

This topic is READ ONLY
import-bot (20211) [Avatar] Offline
[Originally posted by wuxubin]

when I run any applicatin in this book, like java TestFrame, when I click X ,
the window disapper, but the application hasn't terminate until I press
ctrl+C. Do you need to implement windowlister interface, or there is any
method I can call to terminate the application?

import-bot (20211) [Avatar] Offline
Re: how to terminate application
[Originally posted by matt]

Yes you need to implement WindowListener and call System.exit(0) in the
windowClosing() method.