code: private WButton newVisibilityToggleForTab(final int idx) {
  		WButton toggleButton = new WButton("Toggle visibility of tab " + (idx + 1));
  
  		toggleButton.setAction(new Action() {
  			@Override
  			public void execute(final ActionEvent event) {
  				boolean tabVisible = tabset.isTabVisible(idx);
  				tabset.setTabVisible(idx, !tabVisible);
  			}
  		});
  
  		return toggleButton;
  	}
docs: Creates a button to toggle the visibility of a tab.
  
  @param idx the index of the tab.
  @return a button which toggles the visibility of the tab.