posted 23 years ago
Greetings, I have an interesting if not somewhat non-standard problem with JTabbedPane. I have a JTabbedPane with 5 tabs that the user can select. However, on each of the tabs, I'd like for the user to hit the SAVE button (or CANCEL changes button) before s/he is allowed to move to another tab. Therefore, what I'd like to do is intercept the user's movement when s/he attempts to move to a new tab, determine if there are any changes on the current tab, and if so, present a dialog box asking the user if they would like to save changes before moving to the next tab. This will give the user the chance to save the changes and move on to the next tab, cancel the changes and move on to the next tab, or cancel the movement to the next tab and just stay on the current tab.
Just wondered if anyone has had a need/solution for this type of situation.
Thanks
CR