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

Declaration

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

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.*;
import java.awt.*;

public class Main {
    public static void showCell(JTable table, int row, int column) {
        if (row >= table.getRowCount())
            row = table.getRowCount() - 1;
        Rectangle rect = table.getCellRect(row, column, true);
        table.scrollRectToVisible(rect);
        table.clearSelection();// ww w. ja v a  2  s .c o  m
        table.setRowSelectionInterval(row, row);
    }
}

Related

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