Link to home
Start Free TrialLog in
Avatar of anthony0007
anthony0007

asked on

Stop changing tabs in a JTabbedPane

Hi,

I'm using a JTabbedPane and at some point, I need to prevent it from leaving a particular tab (due to a condition), even though the user wants to go to a different  tab . Is this possible with JTabbedPane. I also want to make sure that stateChanged listener doesn't get called.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of hoomanv
hoomanv
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anthony0007
anthony0007

ASKER

Isn't there any other way to prevent it from moving to other tabs. stateChanged Listener gets called once the tab has been changed.
If I can capture an event before tab changes, then it might be helpful.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial