Here you can find the source of stopEditingOnLosingFocus(final JTable table)
public static void stopEditingOnLosingFocus(final JTable table)
//package com.java2s; // LICENSE: This file is distributed under the BSD license. import javax.swing.*; public class Main { public static void stopEditingOnLosingFocus(final JTable table) { table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); }/* w w w.j a va 2s.c o m*/ }