int i, previndex = 0;
int i, prevIndex = 0;
	int getCharPositionX(int num)	{		int i, previndex = 0;		Font f = Font.getDefaultFont();		for (i = 0; i < numOfBreaks; i++) {			if (num < breaks[i]) {				break;			}			previndex = breaks[i];		}		return f.substringWidth(text, previndex, num - previndex);	}