Java JTable Column isNotDuplicateKeyOfTable(String text, TableModel model, int column)

Here you can find the source of isNotDuplicateKeyOfTable(String text, TableModel model, int column)

Description

is Not Duplicate Key Of Table

License

Open Source License

Declaration

public static boolean isNotDuplicateKeyOfTable(String text, TableModel model, int column) 

Method Source Code

//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;
    }
}

Related

  1. getTableColumn(JTable table, int columnIndex)
  2. hideColumn(JTable table, int columnIndex)
  3. installDelegatingColumn(TableColumn column, String label)
  4. isColumnDefinitionChange(TableModelEvent e)
  5. isColumnSorted(JTable table, int column)
  6. layoutColumns(JTable p_Table, boolean p_OnlyVisibleRows)
  7. loadToTableModel(String fileName, Object[] columns)
  8. makeTablePanel(int rows, int cols, int mainColumn, JComponent components[])
  9. newTable(String name, Object[][] rowData, Object[] columnNames)