Java JTable Cell Editor stopCellEditing(JTable table)

Here you can find the source of stopCellEditing(JTable table)

Description

stop Cell Editing

License

Open Source License

Declaration

public static void stopCellEditing(JTable table) 

Method Source Code

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

import javax.swing.DefaultCellEditor;

import javax.swing.JTable;

import javax.swing.table.TableCellEditor;

public class Main {
    public static void stopCellEditing(JTable table) {
        if (table != null) {
            TableCellEditor editor = table.getCellEditor();
            if (editor != null) {
                if (editor instanceof DefaultCellEditor) {
                    ((DefaultCellEditor) editor).stopCellEditing();
                }//from  w  w w  .  j  a va2s .c  o m
            }
        }
    }
}

Related

  1. setEditable(JTextComponent component, boolean editable)
  2. setEditable(JTextComponent... components)
  3. setEditableFalse(JTextField field)
  4. setUneditable(JTextComponent... components)
  5. setupComboBoxEditor(TableColumn column, Object[] values)
  6. stopCellEditing(JTable table)
  7. stopEditing(JTable table)
  8. stopEditing(JTable table)
  9. stopEditing(JTable table)