I am developing a java application that uses a jtabe to allow the user to capture data. This data would be written to a text file later. The application is working fine. Good. However, I wanted to add a button such that when a user click this button, the application should first ask the user to save(writing to a text file) and after this the application should close the table(terminating the the table instance from the memory) -more of closing a Word Document. My table is sitting on panel.
How do I perform this? I need the closing (a sort of myTable.close() - to errase data in the table) part only,everything is working fine.