private Integer[] getRows( String line, int indent ) {

		final FontMetrics METRICS = getFontMetrics(getFont());

		final int WIDTH = getWidth() - 2*PAD;
		final int indentsize = METRICS.stringWidth(" ")*indent;

		//hold the output in this...
		List<Integer> rows = new LinkedList<Integer>();

		//number of chars for current row.
		int row = 0;

		int remaining = WIDTH;

		//I use " " as an indent
		//this is a cheap hack to fix an infinite loop
		//if the window is too small
		if ( METRICS.stringWidth(" ")*indent > WIDTH )
			return new Integer[0];

		//first, we attempt to split the thinggy at spaces...
		StringTokenizer st = new StringTokenizer(line, " ",true); 

		while (st.hasMoreTokens()) {
			String tok = st.nextToken();
			int width = METRICS.stringWidth(tok);
			
			//if the current token will fit in the current row
			if ( width <= remaining ) {
				row += tok.length();
				remaining -= width;

			//in this case, the current token wn't fit in a row PERIOD,
			//so it definitely *has* to be split up.
			} else if ( width > WIDTH-indentsize ) {
	
				//now we're (lol) going to go through the same process
				//as getRows(), but where each token is a character!
				for (int i = 0; i < tok.length(); ++i) {

					char chr = tok.charAt(i);
					width = METRICS.charWidth(chr);

					if  ( width <= remaining ) {
						remaining -= width;
						row += 1;
					} else {
						rows.add(row);
						row = 1;
						remaining = WIDTH - indentsize - width;
					}
				}
			
			//in this case, the token *could* fit in a row,
			//but it won't fit in the remaining space of this one
			//so we finish the row off and start a new one.
			//note that everytime we start a new row, we indent four spaces.
			} else {
				rows.add(row);
				//in any case...rows.add(row);
				row = tok.length();
				remaining = WIDTH - indentsize - width;
			}
		}

		if (row != 0)
			rows.add(row);

		return rows.toArray(new Integer[rows.size()]);
	}