code: protected WebMarkupContainer newCloseLink(final String linkId, final int index)
  	{
  		return new AjaxFallbackLink<Void>(linkId)
  		{
  
  			private static final long serialVersionUID = 1L;
  
  			@Override
  			public void onClick(final AjaxRequestTarget target)
  			{
  				if (target != null)
  				{
  					onRemoveTab(target, index);
  				}
  				onAjaxUpdate(target);
  			}
  		};
  	}
docs: Factory method for links used to close the selected tab.
  
  The created component is attached to the following markup. Label component with id: title
  will be added for you by the tabbed panel.
  
  <pre>
  &lt;a href=&quot;#&quot; wicket:id=&quot;link&quot;&gt;&lt;span wicket:id=&quot;title&quot;&gt;[[tab title]]&lt;/span&gt;&lt;/a&gt;
  </pre>
  
  Example implementation:
  
  <pre>
  protected WebMarkupContainer newCloseLink(String linkId, final int index)
  {
  return new Link(linkId)
  {
  private static final long serialVersionUID = 1L;
  
  public void onClick()
  {
  setSelectedTab(index);
  }
  };
  }
  </pre>
  
  @param linkId
  component id with which the link should be created
  @param index
  index of the tab that should be activated when this link is clicked. See
  {@link #setSelectedTab(int)}.
  @return created link component