scroll JTable by row - Java Swing

Java examples for Swing:JTable Scroll

Description

scroll JTable by row

Demo Code


//package com.java2s;
import javax.swing.*;
import java.awt.*;

public class Main {
    public static void scroll(JTable table, int row) {
        table.scrollRectToVisible(new Rectangle(table.getCellRect(row, 0,
                true)));/*from w w w . ja  v a  2s .c  o  m*/
    }
}

Related Tutorials