While testing JTabbedPane.removeTabAt(int index) I found that an ArrayIndexOutOfBoundsException was thrown when index is great then
tabCount size. If the user has 2 tabs and tries to removeTabAt(-1)
you get an ArrayIndexOutOfBoundsException. Also if the user tries to
removeTabAt(5) an ArrayIndexOutOfBoundsException gets thrown. Yet in the remove(Component component) if we make a call to remove(notAComponentInTabbedPane) the it does nothing. No ArrayIndexOutOfBoundsException was thrown. It appears to be inconsistent between
the two remove methods and the docs. This is manifested in most of the methods in JTabbedPane. I am filing one bug on this. The docs do not make reference to Exception handling yet we throw ArrayIndexOutOfBoundsException; but in remove() method we silently pass the call and don't throw an Exception. How should this work.