public void newTab(boolean isPublic, String name, boolean selfOpened)
	{
		try
		{
			boolean exist = false;
			boolean ownName = false;
			if (name.equals(cc.getMyName()))
			{
				cc.addPublicMessage("Error: Unable to open private chat with yourself!");
				tabbedPane.setSelectedIndex(0);
				ownName = true;
			}
			for (int i = 0; i < tabbedPane.getTabCount(); i++)
				if (tabbedPane.getTitleAt(i).equals(name))
				{
					tabbedPane.setSelectedIndex(i);
					exist = true;
				}
			if (!exist && !ownName)
			{
				JComponent panel = makeTextPanel(isPublic, name);
				tabbedPane.addTab(name, panel);
				if (!isPublic)
					tabbedPane.setTabComponentAt(tabbedPane.getTabCount()-1, new ButtonTabComponent(tabbedPane));
				if(selfOpened)
					tabbedPane.setSelectedComponent(panel);
				else
					tabbedPane.setBackgroundAt(tabbedPane.getTabCount()-1, Color.orange);
//					tabController.getTabbedPane().setBackgroundAt(tabController.getTabbedPane().getTabCount()-1, Color.ORANGE); 
					
			}
		}
		catch(NullPointerException e)
		{
			cc.addPublicMessage("Error: No user was selected");
		}
	}