List of usage examples for javax.swing JTextPane getInsets
@BeanProperty(expert = true)
public Insets getInsets()
super.getInsets
. From source file:MainClass.java
protected Rectangle getVisibleEditorRect(JTextPane ta) { Rectangle alloc = ta.getBounds(); if ((alloc.width > 0) && (alloc.height > 0)) { alloc.x = alloc.y = 0;/*from w ww . j a v a 2 s . c o m*/ Insets insets = ta.getInsets(); alloc.x += insets.left; alloc.y += insets.top; alloc.width -= insets.left + insets.right; alloc.height -= insets.top + insets.bottom; return alloc; } return null; }