@SuppressWarnings("unchecked")
	@Override
	public void insertElementAt(E element, int index)
	{
		int size = getSize();
		for(index = 0; index < size; index++)
		{
			if(comparator != null)
			{
				E o = getElementAt(index);
				if(comparator.compare(o, element) > 0)
					break;
			}
			else
			{
				Comparable c = (Comparable) getElementAt(index);
				if(c.compareTo(element) > 0)
					break;
			}
		}
		super.insertElementAt(element, index);
		if(index == 0 && element != null)
			setSelectedItem(element);
	}