Hi it’s me again
i tried to remove a dockable. I found a solution here but when i remove a dockable, i get an exception.
that’s my code:
public void removeServiceTabs(){
//TODO Settings Exception entfernen?
int dockCounter = 0;
String dockTitle = null;
dockCounter = control.getCDockableCount();
for(int i = 0; i < dockCounter; i++){
SingleCDockable dockToRemove = (SingleCDockable) control.getCDockable(i);
dockTitle = dockToRemove.intern().getTitleText();
if(!dockTitle.equals("Project Information") && !dockTitle.equals("Settings")
&& !dockTitle.equals("Projects") && !dockTitle.equals("Output")){
dockToRemove.setVisible(false);
control.removeSingleDockable(dockTitle);
}
}
}
Here is the exception:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: not a valid character of a segment: ' '
at bibliothek.util.Path.<init>(Unknown Source)
at bibliothek.gui.dock.common.intern.CPlaceholderStrategy$1.removed(Unknown Source)
at bibliothek.gui.dock.common.CControl.remove(Unknown Source)
at bibliothek.gui.dock.common.CControl.removeSingleDockable(Unknown Source)
at mvc.view.DiagnosticClient.removeServiceTabs(DiagnosticClient.java:126)