public TextPosition getposition (int x, int y)
	{
		if (L.first() == null) return null;
		if (y < 0) return new TextPosition(TopLine, TopLineCount, 0);
		if (TopLine == null) return null;
		ListElement e = TopLine;
		int h = Leading + Height;
		if (h == 0) return null;
		h = y / h;
		int i;
		for (i = 0; i < h; i++)
		{
			if (e.next() == null || i == PageSize - 1)
				return new TextPosition(e, TopLineCount + i,
					((Line)e.content()).length());
			e = e.next();
		}
		return new TextPosition(e, TopLineCount + i, ((Line)e.content())
			.getpos(x, 2));
	}