{ Component[] components = toolBars.getComponents(); for(int i = 0; i < components.length; i++) { if(components[i] == toolBar) { toolBars.remove(toolBar); toolBar = GUIUtilities.loadToolBar("view.toolbar"); toolBar.add(Box.createGlue()); toolBars.add(toolBar,i); getRootPane().revalidate(); return; } } } else { toolBar = GUIUtilities.loadToolBar("view.toolbar"); toolBar.add(Box.createGlue()); addToolBar(toolBar); }
toolBars.remove(toolBar);  toolBar = GUIUtilities.loadToolBar("view.toolbar"); toolBar.add(Box.createGlue());  toolBars.add(toolBar,0); getRootPane().revalidate();
	private void loadToolBars()	{		if(jEdit.getBooleanProperty("view.showToolbar"))		{			if(toolBar != null)			{				Component[] components = toolBars.getComponents();				for(int i = 0; i < components.length; i++)				{					if(components[i] == toolBar)					{						toolBars.remove(toolBar);						toolBar = GUIUtilities.loadToolBar("view.toolbar");						toolBar.add(Box.createGlue());						toolBars.add(toolBar,i);						getRootPane().revalidate();						return;					}				}			}			else			{				toolBar = GUIUtilities.loadToolBar("view.toolbar");				toolBar.add(Box.createGlue());				addToolBar(toolBar);			}		}		else if(toolBar != null)		{			removeToolBar(toolBar);			toolBar = null;		}		if(jEdit.getBooleanProperty("view.showSearchbar"))		{			if(searchBar == null)			{				searchBar = new SearchBar(this);				addToolBar(searchBar);			}		}		else if(searchBar != null)		{			removeToolBar(searchBar);			searchBar = null;		}	}