[mobility] Perform action when closing Netbeans Platform Application's main window

  • From: "Winnifred777" < >
  • To:
  • Subject: [mobility] Perform action when closing Netbeans Platform Application's main window
  • Date: Tue, 09 Jul 2013 20:09:15 -0400

Hello guys. I'm designing an application using netbeans platform module 
suite.  I made the program in a way to create a folder whenever I open a 
topcomponent. I wanted whenever I close the main window for it to delete that 
folder. I had the function for deleting the directory already which basically 
using file.delete().
I tried adding an action listener to the following in the topcomponent class:

Code:

WindowManager.getDefault().getMainWindow().addWindowListener(new 
WindowListener() {
/*Abstract Methods*/
     @Override
     public void windowClosing(WindowEvent we) {
           //deleteFoldersActions;
     }
     @Override
     public void windowClosed(WindowEvent we) {
           //deleteFoldersActions;
     }
//other abstract methods....
});



I don't know where I'm going wrong. I was looking for solutions online and I 
didn't find any help. Any possible solution?






[mobility] Perform action when closing Netbeans Platform Application's main window

Winnifred777 07/10/2013

Project Features

About this Project

Mobility was started in November 2009, is owned by dstrupl, and has 40 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close