Example usage for javax.swing JTable getCellEditor

List of usage examples for javax.swing JTable getCellEditor

Introduction

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

Prototype

public TableCellEditor getCellEditor(int row, int column) 

Source Link

Document

Returns an appropriate editor for the cell specified by row and column.

Usage

From source file:fll.subjective.SubjectiveFrame.java

/**
 * Stop the cell editors to ensure data is flushed
 *//*from ww w  .ja  va  2 s.c  om*/
private void stopCellEditors() {
    final Iterator<JTable> iter = _tables.values().iterator();
    while (iter.hasNext()) {
        final JTable table = iter.next();
        final int editingColumn = table.getEditingColumn();
        final int editingRow = table.getEditingRow();
        if (editingColumn > -1) {
            final TableCellEditor cellEditor = table.getCellEditor(editingRow, editingColumn);
            if (null != cellEditor) {
                cellEditor.stopCellEditing();
            }
        }
    }
}