public int lineToY(int line){
  FontMetrics fm=painter.getFontMetrics();
  return (line - firstLine) * fm.getHeight() - (fm.getLeading() + fm.getMaxDescent());
}

public int lineToY ( int line ) { FontMetrics fm = painter . getFontMetrics ( ) ; return ( line - firstLine ) * fm . getHeight ( ) - ( fm . getLeading ( ) + fm . getMaxDescent ( ) ) ; }
converts a line index to a y co - ordinate .
