Here you can find the source of showCell(JTable table, int row, int column)
Parameter | Description |
---|---|
table | the table |
row | the row |
column | the column |
public static void showCell(JTable table, int row, int column)
//package com.java2s; //License from project: Open Source License import java.awt.Rectangle; import javax.swing.JTable; public class Main { /**//from w w w. ja va 2 s.c o m * Show cell. * * @param table the table * @param row the row * @param column the column */ public static void showCell(JTable table, int row, int column) { Rectangle rect = table.getCellRect(row, column, true); table.scrollRectToVisible(rect); table.clearSelection(); table.setRowSelectionInterval(row, row); } }