Java JTable Cell showCell(JTable table, int row, int column)

Here you can find the source of showCell(JTable table, int row, int column)

Description

Show cell.

License

Open Source License

Parameter

Parameter Description
table the table
row the row
column the column

Declaration

public static void showCell(JTable table, int row, int column) 

Method Source Code


//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);
    }
}

Related

  1. getWidestCellInColumn(JTable table, TableColumn col)
  2. getWidestCellInColumn(TableColumn col, JTable table)
  3. isCellVisible(JTable table, int rowIndex, int vColIndex)
  4. renderHTMLCell(final StringBuffer buffer, final String contents, final String css, final int align)
  5. setCellTextAllignment(JTable table, int alignment)
  6. showCell(JTable table, int row, int column)
  7. startEditingAtCell(JTable table, int row, int column)