Java Utililty Methods Swing Font Height

List of utility methods to do Swing Font Height

Description

The list of methods to do Swing Font Height are organized into topic(s).

Method

RectangledrawString(Graphics g, Font font, String text, int x, int y, int width, int height, int align)
draw String
return drawString(g, font, text, x, y, width, height, align, false);
intgetFontHeight(JComponent comp)
get Font Height
if (comp == null)
    return 0;
Font font = comp.getFont();
if (font == null)
    return 0;
FontMetrics fm = comp.getFontMetrics(font);
if (fm == null) {
    return 16;
...
intgetFontHeight(JComponent component)
get Font Height
return getFontHeight(component, component.getFont());
intgetLabelFontHeight()
get Label Font Height
return getFontHeight(LABEL_FONT_KEY);