public void removeTabAt(int index) {
Content content = getContentAt(index);
if (content == null)
throw new IllegalArgumentException("Invalid index location.");
content.removePropertyChangeListener(this);
super.removeTabAt(index);
contentMap.remove(index);
Integer[] keys = contentMap.keySet().toArray(new Integer[contentMap.size()]);
Arrays.sort(keys);