Method in JTabbedPane:
public void insertTab(String title,
Icon icon,
Component component,
String tip,
int index)
Inserts a new tab for the given component, at the given index, represented by the given title and/or icon, either of which may be null.
Parameters:
title - the title to be displayed on the tab
icon - the icon to be displayed on the tab
component - the component to be displayed when this tab is clicked.
tip - the tooltip to be displayed for this tab
index - the position to insert this new tab (> 0 and <= getTabCount())
Throws:
IndexOutOfBoundsException - if the index is out of range (< 0 or > getTabCount())