You can get the height of line from font. Example according code below.
public int print(Graphics g, PageFormat pf, int pageIndex){
Font font = new Font("Serif", Font.PLAIN, 14);
FontMetrics metrics = g.getFontMetrics(font);
int lineHeight = metrics.getHeight();
}
No comments:
Post a Comment