16.24.1.Font Metrics: the wealth of dimensional data about a fontPrevious/Next
import java.awt.FontMetrics;
import javax.swing.JFrame;
public class GettingFontMetrics { public static void main(String args[]) {
JFrame f = new JFrame("JColorChooser Sample");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
FontMetrics metrics = f.getFontMetrics(f.getFont());
f.setSize(300, 200);
f.setVisible(true);
}
}
16.24.Font Metrics
16.24.1.
Font Metrics: the wealth of dimensional data about a font