buffer.getText(start,lineElement.getEndOffset() - (start + 1),line);
int end = lineElement.getEndOffset(); buffer.getText(start,end - (start + 1),line);
	public void drawLine(int lineIndex, Graphics g, int x, int y)	{		Buffer buffer = (Buffer)getDocument();		FontMetrics metrics = g.getFontMetrics();		Hashtable colors = buffer.getColors();		TokenMarker tokenMarker = buffer.getTokenMarker();		try		{			Element lineElement = getElement().getElement(				lineIndex);			int start = lineElement.getStartOffset();			buffer.getText(start,lineElement.getEndOffset()				- (start + 1),line);			if(tokenMarker == null)			{				g.setColor(Color.black);				Utilities.drawTabbedText(line,x,y,g,this,0);			}			else			{				Token tokens = tokenMarker.markTokens(line,					lineIndex);				int offset = 0;				for(; tokens != null; tokens = tokens.next)				{					int length = tokens.length;					Color color;					String id = tokens.id;					if(id == null)						color = Color.black;					else						color = (Color)colors.get(id);					g.setColor(color == null ?						   Color.black : color);				   	line.count = length;					x = Utilities.drawTabbedText(line,x,						   y,g,this,offset);					line.offset += length;					offset += length;					if(!tokens.nextValid)						break;				}			}		}		catch(BadLocationException bl)		{			// shouldn't happen			bl.printStackTrace();		}	}