public void stateChanged(ChangeEvent e) {
Object obj = e.getSource();
if(obj instanceof JTabbedPane) {
JTabbedPane pane = (JTabbedPane)obj;
Component c = pane.getSelectedComponent();
Dockable dockable = DockingManager.getDockable(c);
if(dockable!=null) {
activateComponent(dockable.getComponent());
udpateTabChangeFocus(dockable);
}
}
}