import ch.psi.utils.swing.TextEditor as TextEditor import ch.psi.pshell.ui.App as App title="CXXC3" editor = TextEditor(); tabpane = App.getInstance().getMainFrame().getLeftTab(); App.getInstance().getMainFrame().openComponent(title, editor, tabpane) for i in range(App.getInstance().getMainFrame().getLeftTab().getTabCount()): t=App.getInstance().getMainFrame().getLeftTab().getTabComponentAt(i) if t: if t.getLabel().getText() == title: for l in t.getLabel().getMouseListeners(): print l t.getLabel().removeMouseListener(l)