closeAction.setEnabled(key.isCloseEnabled());
// add a tooltip
closeAction.putValue(AbstractAction.SHORT_DESCRIPTION,
UIManager.get("DockTabbedPane.closeButtonText"));
final JTabbedPaneSmartIcon smartIcon = new JTabbedPaneSmartIcon(key.getIcon(), key.getName(),
new SmartIconJButton[]{ closeIcon});
smartIcon.setTooltipText(key.getTooltip());
smartIcon.setIconForTabbedPane(this);
if (tab >= getTabCount()){
//addTab(key.getName(), key.getIcon(), (Component)dc, key.getTooltip());
addTab("",smartIcon, (Component) dc, key.getTooltip());
//addTab(key.getName(),smartIcon, (Component) dc, key.getTooltip());