NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Perform action when closing Netbeans Platform Application's main window

 
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users
View previous topic :: View next topic  
Author Message
Winnifred777



Joined: 31 May 2013
Posts: 6
Location: Mandeville, Manchester, Jamaica

PostPosted: Wed Jul 10, 2013 12:09 am    Post subject: Perform action when closing Netbeans Platform Application's main window Reply with quote

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?
Back to top
embun44



Joined: 10 Jun 2015
Posts: 5

PostPosted: Wed Jun 10, 2015 4:04 am    Post subject: comment Reply with quote

Do you have managed to create applications that use the platform module neatbeans suite? please teach me the process of making the application
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo