Here you can find the source of isNotDuplicateKeyOfTable(String text, TableModel model, int column)
public static boolean isNotDuplicateKeyOfTable(String text, TableModel model, int column)
//package com.java2s; //License from project: Open Source License import javax.swing.table.TableModel; public class Main { public static boolean isNotDuplicateKeyOfTable(String text, TableModel model, int column) { int rowcount = model.getRowCount(); for (int row = 0; row < rowcount; row++) { if (model.getValueAt(row, column).toString().equals(text)) return false; }//w w w . j a v a 2 s . c om return true; } }