protected Dimension computeLengths(String annoText){
  String[] lines=Util.splitLines(annoText);
  int lineLength=0;
  for (  String line : lines) {
    if (line.length() > lineLength)     lineLength=line.length();
  }
  return new Dimension(lineLength + 5,lines.length + 1);
}

protected Dimension computeLengths ( String annoText ) { String [ ] lines = Util . splitLines ( annoText ) ; int lineLength = 0 ; for ( String line : lines ) { if ( line . length ( ) > lineLength ) lineLength = line . length ( ) ; } return new Dimension ( lineLength + 5 , lines . length + 1 ) ; }
determine the number of lines in the annotation text and the length of the longest line .
