Here you can find the source of stopCellEditing(JTable table)
public static void stopCellEditing(JTable table)
//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 } } } }