{ if(selectionStart != selectionEnd) setCaretPosition(selectionEnd); else setCaretPosition(caret); }
setCaretPosition(caret);
	public void goToNextCharacter(boolean select)	{		int caret = getCaretPosition();		if(caret == buffer.getLength())			getToolkit().beep();		else		{			caret++;			if(select)				select(getMarkPosition(),caret);			else			{				if(selectionStart != selectionEnd)					setCaretPosition(selectionEnd);				else					setCaretPosition(caret);			}		}	}