page.setVisible(true);//PM:14/01/2009:set to be visible
page.putClientProperty(IS_TAB_VISIBLE_PROPERTY, true);
List<JPanel> allPages = getAllPages();
Map<Component, TabInfo> hiddenPages = getHiddenPages();
TabInfo ti = (TabInfo) hiddenPages.get(page);
//PM:22/07/2008: fixed tab order
int insertIndex = 0;
JPanel lastVisible = null;
for (JPanel tab : allPages){
if (tab == page)
break;
if (isTabVisible(tab))
lastVisible = tab;
}
insertIndex = indexOfComponent(lastVisible) + 1;
super.insertTab(ti.getCaption(), ti.getIcon(), page,
page.getToolTipText(), insertIndex);
hiddenPages.remove(page);
_log.debug("Setting Tab Visible: " + ti.getCaption() );
}
}