Utility method to obtain line height in JTextComponent

This commit is contained in:
Vassiliy.Kudryashov
2016-11-22 23:24:44 +03:00
parent 944a8d49e3
commit c4f2aa90b1
@@ -3757,6 +3757,10 @@ public class UIUtil {
}
}
public static int getLineHeight(@NotNull JTextComponent textComponent) {
return textComponent.getFontMetrics(textComponent.getFont()).getHeight();
}
/**
* Returns the first focusable component in the specified container.
* This method returns {@code null} if container is {@code null},