RFR: 8290278: JavaDoc of index parameter of method JTabbedPane.insertTab
Harshitha Onkar
honkar at openjdk.org
Fri Jul 22 19:12:18 UTC 2022
On Thu, 14 Jul 2022 15:58:18 GMT, Tejesh R <tr at openjdk.org> wrote:
> JavaDoc of _JTabbedPane.inseetTab()_ is updated. The index position to insert a new tab ranges from 0 to _TabCount_(Position after the last tab position), the same is updated from _> 0_ to _>= 0_ .
Minor suggestion: how about we add index to the comparison?
` {@code (index >= 0 && index <= getTabCount())}` since index adds more clarity to the comparison and additionally to keep it consistent across the JTabbedPane similar to -
https://github.com/openjdk/jdk/blob/ef8486a1a40c8b65d3db6048c3dc79802073148d/src/java.desktop/share/classes/javax/swing/JTabbedPane.java#L1089
https://github.com/openjdk/jdk/blob/ef8486a1a40c8b65d3db6048c3dc79802073148d/src/java.desktop/share/classes/javax/swing/JTabbedPane.java#L1264
-------------
PR: https://git.openjdk.org/jdk/pull/9496
More information about the client-libs-dev
mailing list