- for (int loc = wb.first(); loc != BreakIterator.DONE; loc = wb.next()) {
- String word = text.substring(saved, loc);
- Point extent = gc.textExtent(word);
- if (extent.x > wHint) {
- // overflow
- saved = last;
- height += extent.y;
- // switch to current word so maxWidth will accommodate very long single words
- word = text.substring(last, loc);
- extent = gc.textExtent(word);
- }
- maxWidth = Math.max(maxWidth, extent.x);
- last = loc;
- }
+// for (int loc = wb.first(); loc != BreakIterator.DONE; loc = wb.next()) {
+// String word = text.substring(saved, loc);
+// Point extent = gc.textExtent(word);
+// if (extent.x > wHint) {
+// // overflow
+// saved = last;
+// height += extent.y;
+// // switch to current word so maxWidth will accommodate very long single words
+// word = text.substring(last, loc);
+// extent = gc.textExtent(word);
+// }
+// maxWidth = Math.max(maxWidth, extent.x);
+// last = loc;
+// }