This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
You can add a ChangeListener to listen to changes that have already happened, but as far as I know there's no way to block changing the selected tab. You can of course change back to the first tab instead.
Rob Spoor wrote:as far as I know there's no way to block changing the selected tab.
The selection takes place in the JTabbedPane's model. To repeat what I said on another forum in respect of unusual requirements for selection in a JList, weird selection behavior requires an equally weird selection model.