if (oldSelected != -1) {
JComponent old = (JComponent) tabbedPane.getComponentAt(oldSelected);
if (old instanceof JToolBar)
removeFilterToolBar((JToolBar)old);
ac = (AbstractAction)actions.get(i);
ac.actionPerformed(new ActionEvent(this,eventNum++,"click"));
tabbedPane.setForegroundAt(oldSelected, Color.BLACK);
tabbedPane.setBackgroundAt(oldSelected, backgroundUnselected);
JComponent selectedComponent = (JComponent) tabbedPane.getSelectedComponent();
if (selectedComponent instanceof JToolBar)
addFilterToolBar((JToolBar)selectedComponent);