int lineNo = map.getElementIndex(textArea.getSelectionStart());
int lineNo = textArea.getSelectionStartLine();
	public void actionPerformed(ActionEvent evt)	{		View view = getView(evt);		Buffer buffer = view.getBuffer();		Element map = buffer.getDefaultRootElement();		JEditTextArea textArea = view.getTextArea();		int lineNo = map.getElementIndex(textArea.getSelectionStart());		int start = map.getElement(buffer.locateParagraphStart(lineNo))			.getStartOffset();		Element endElement = map.getElement(buffer			.locateParagraphEnd(lineNo));		int end;		if(endElement == null)			end = buffer.getLength();		else			end = endElement.getStartOffset();		textArea.select(start,Math.max(textArea.getSelectionEnd(),end));	}