code: public void addCloseButton () {
  		Label titleLabel = getTitleLabel();
  		Table titleTable = getTitleTable();
  
  		VisImageButton closeButton = new VisImageButton("close-window");
  		titleTable.add(closeButton).padRight(-getPadRight() + 0.7f);
  		closeButton.addListener(new ChangeListener() {
  			@Override
  			public void changed (ChangeEvent event, Actor actor) {
  				close();
  			}
  		});
  		closeButton.addListener(new ClickListener() {
  			@Override
  			public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
  				event.cancel();
  				return true;
  			}
  		});
  
  		if (titleLabel.getLabelAlign() == Align.center && titleTable.getChildren().size == 2)
  			titleTable.getCell(titleLabel).padLeft(closeButton.getWidth() * 2);
  	}
docs: Adds close button to window, next to window title. After pressing that button, {@link #close()} is called. If nothing
  else was added to title table, and current title alignment is center then the title will be automatically centered.