Component c = scroll.getViewport().getComponents()[0];
if (c instanceof LoggingWindow) {
LoggingWindow log = (LoggingWindow) c;
for (TabHighlighter th : tabHighlighters) {
if (th.component == this.getComponentAt(index)) {
log.removeDocumentListener(th);
tabHighlighters.remove(th);
this.removeChangeListener(th);
break;
}
}