public void closePanel(String chan) {
	    int index = indexOfTab(chan);
	     if (index != -1) {	      
	      tabs.removeTabAt(index); 
	      if (index <= lastChanIndex) 
	        lastChanIndex--; 
	    }
	    setSelectedTab();
	    tabs.revalidate();
	  }