Example usage for javax.swing JTable getInsets

List of usage examples for javax.swing JTable getInsets

Introduction

In this page you can find the example usage for javax.swing JTable getInsets.

Prototype

@BeanProperty(expert = true)
public Insets getInsets() 

Source Link

Document

If a border has been set on this component, returns the border's insets; otherwise calls super.getInsets.

Usage

From source file:Main.java

public static Rectangle getRowBounds(JTable table, int first, int last) {
    Rectangle result = table.getCellRect(first, -1, true);
    result = result.union(table.getCellRect(last, -1, true));
    Insets i = table.getInsets();

    result.x = i.left;//from  ww w.ja v  a 2  s .  c o  m
    result.width = table.getWidth() - i.left - i.right;

    return result;
}