int gotoLine = firstLine + visibleLines / 2;
int gotoLine = buffer.virtualToPhysical(firstLine + visibleLines / 2);
	public void centerCaret()	{		Element map = buffer.getDefaultRootElement();		int gotoLine = firstLine + visibleLines / 2;		if(gotoLine < 0 || gotoLine >= map.getElementCount())		{			getToolkit().beep();			return;		}		Element element = map.getElement(gotoLine);		setCaretPosition(element.getStartOffset());	}