code: @Override
  	public void deleteSelectedText()
  	{
  		if (!selectingText)
  			return;
  
  		int start = Math.min(selectionCursor.index, cursor.index);
  		int end = Math.max(selectionCursor.index, cursor.index);
  
  		password.delete(start, end);
  		updateText();
  		selectingText = false;
  		cursor.jumpTo(start);
  	}
docs: Delete selected text.