public void write(int rowStart,int colStart,int rowEnd,int colEnd){
  if (page == null) {
    newpage();
  }
  int xStart=x0 + (colStart - 1) * charwidth + charwidth / 2;
  int xEnd=x0 + (colEnd - 1) * charwidth + charwidth / 2;
  int yStart=y0 + rowStart * lineheight + (lineheight - lineascent) / 2;
  int yEnd=y0 + rowEnd * lineheight + (lineheight - lineascent) / 2;
  if (page != null && pagenum >= prFirst) {
    page.drawLine(xStart,yStart,xEnd,yEnd);
  }
}

public void write ( int rowStart , int colStart , int rowEnd , int colEnd ) { if ( page == null ) { newpage ( ) ; } int xStart = x0 + ( colStart - 1 ) * charwidth + charwidth / 2 ; int xEnd = x0 + ( colEnd - 1 ) * charwidth + charwidth / 2 ; int yStart = y0 + rowStart * lineheight + ( lineheight - lineascent ) / 2 ; int yEnd = y0 + rowEnd * lineheight + ( lineheight - lineascent ) / 2 ; if ( page != null && pagenum >= prFirst ) { page . drawLine ( xStart , yStart , xEnd , yEnd ) ; } }
draw a line on the printout . < p > this was not in the original class , but was added afterwards by dennis miller . < p > colstart and colend represent the horizontal character positions . the lines actually start in the middle of the character position to make it easy to draw vertical lines and space them between printed characters . < p > rowstart and rowend represent the vertical character positions . horizontal lines are drawn underneath the row ( line ) number . they are offset so they appear evenly spaced , although they don ' t take into account any space needed for descenders , so they look best with all caps text
