code: public void deleteSelectedText()
  	{
  		if (!selectingText)
  			return;
  
  		int start = Math.min(selectionCursor.index, cursor.index);
  		int end = Math.max(selectionCursor.index, cursor.index);
  
  		String oldValue = this.text.toString();
  		String newValue = new StringBuilder(oldValue).delete(start, end).toString();
  
  		if (!fireEvent(new ComponentEvent.ValueChange<>(this, oldValue, newValue)))
  			return;
  
  		this.text = new StringBuilder(newValue);
  		guiText.setText(newValue);
  		selectingText = false;
  		cursor.jumpTo(start);
  	}
docs: Deletes the text currently selected.