Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

How to invoke ActionListener from WindowListener

  Asked By: Arland    Date: Jan 08    Category: Java    Views: 748
  


This is a Swing related question.

I have an ActionListener object called ShutdownActionListener

This action is invoked whenever the user click on File->Exit on the menu.

However, the user can also close the window to quit the application.
In this case, how do I invoke the same code cleanly from WindowListener?

Share: