List of usage examples for javax.swing JTextArea getInsets
@BeanProperty(expert = true)
public Insets getInsets()
super.getInsets
. From source file:Main.java
public static int getTextableHeight(JTextArea textArea) { int textableHeight = textArea.getLineCount() * textArea.getFontMetrics(textArea.getFont()).getHeight(); Insets insets = textArea.getInsets(); if (insets != null) textableHeight += insets.top + insets.bottom; return textableHeight; }