I have a JTable where a user can create a custom report. They can add/remove "rows" which are columns in the report.
I want to have them be able to "undo" a row deletion. Currently they can just reset the whole report back to the standard report via a button. This is OK, but there's a lot of columns and some users are grumbling about the time they can lose if they accidentally delete a row.
I figure I can create a stack easily enough that tracks the rows deleted, so it'll just be a "add" event that I can call on a key event listener (listen for ctrl-z, or a button perhaps). Once it's called, it'll just pop off the stack and add the row.
But, since I'm using the Netbeans platform anyway, I'd love to tie into the edit->undo functionality that exists there.
What are the commands, or API calls that I can make to tie into that undo functionality that exists in the platform?
You'll need to add an action to your application (using the wizard).
Maybe this comes handy: