-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
-
Java API
-
SE
Summary
Correct the specification of JTabbedPane.insertTab() to say that an index of 0 is allowed.
Problem
The specification of JTabbedPane.insertTab() incorrectly states that the index parameter must be > 0. This is not only incorrect but inconsistent with the throws clause
Solution
Java Doc is updated for the index parameter range, from > 0 to >= 0.
Specification
class javax.swing.JTabbedPane
* @param index the position to insert this new tab
- * ({@code > 0 and <= getTabCount()})
+ * {@code (index >= 0 && index <= getTabCount())}
*
* @throws IndexOutOfBoundsException if the index is out of range
- * ({@code < 0 or > getTabCount()})
+ * {@code (index < 0 || index > getTabCount())}
public void insertTab(String title, Icon icon, Component component, String tip, int index) {
- csr of
-
JDK-8290278 JavaDoc of index parameter of method JTabbedPane.insertTab
-
- Resolved
-