model.setCaretPosition(model.xyToOffset( evt.getX(),evt.getY()));
int offset = model.xyToOffset(evt.getX(),evt.getY()); if((evt.getModifiers() & InputEvent.SHIFT_MASK) != 0) model.setSelectionEnd(offset); else model.setCaretPosition(offset);
		public void mouseClicked(MouseEvent evt)		{			switch(evt.getClickCount())			{			case 1:				model.setCaretPosition(model.xyToOffset(					evt.getX(),evt.getY()));				break;			case 2:				break;			case 3:				int line = model.yToLine(evt.getY());				int start = model.getLineStartOffset(line);				int end = model.getLineEndOffset(line) - 1;				model.select(start,end);				break;			}		}