Simon Pepping wrote:
Do you need to break the line is as many separate text areas as there
are word spaces ( + 1 )?

Well, the line may be parsed while rendering, which means you don't have to create area objects, roughly: StringTokenizer tok=new StringTokenizer(...); while( tok.hasMoreTokens ) { String word = tok.nextToken(); renderText(x,y,word); x+=width(word); x+=adjustedSpaceWidth; } There is a tradeoff between avoiding recomputing the word width and carrying it around for probably some significant time.

J.Pietschmann

Reply via email to