remove(tsContainerPanel);
tabbedPane.addTab("Graph", null, tsContainerPanel, "Graph");
add(tabbedPane);
}
tabbedPane.addTab(name, null, panel, name);
tabbedPane.setTabComponentAt(tabbedPane.getTabCount() - 1, new ButtonTabComponent(tabbedPane));
tabbedPane.setSelectedIndex(tabbedPane.getTabCount() - 1);
((ButtonTabComponent)(tabbedPane.getTabComponentAt(tabbedPane.getTabCount() - 1))).addButtonActionListener((ActionListener)(new CloseTabAction(this)));
}