Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
6.6.0
-
None
-
None
Description
The JavaDoc of TabbedPanel.setSelectedTab() states that -1 is a valid argument. Actually passing -1 will throw a IndexOutOfBoundsException
/** * sets the selected tab * * @param index * index of the tab to select * @return this for chaining * @throws IndexOutOfBoundsException * if index is not {@code -1} or in the range of available tabs */ public TabbedPanel<T> setSelectedTab(final int index) { if ((index < 0) || (index >= tabs.size())) { throw new IndexOutOfBoundsException(); } setDefaultModelObject(index); // force the tab's component to be aquired again if already the current tab currentTab = -1; setCurrentTab(index); return this; }