for(int i = 0; i < graphTabs.getComponentCount(); i++)
int count = graphTabs.getComponentCount(); for(int i = count-1; i >= 0; i--)
  public void closeWorkspace()  {    for(int i = 0; i < graphTabs.getComponentCount(); i++)    {      graphTabs.remove(i);    }    manager.setCurrentWorkspace(null);    navigator.setWorkspace(null);    Prefs.INSTANCE.remove(Prefs.LAST_WORKSPACE);    mlayout.clear();    graphs.clear();  }