Here you can find the source of findColumn(TableModel model, String name)
static int findColumn(TableModel model, String name)
//package com.java2s; //License from project: Open Source License import javax.swing.table.TableModel; public class Main { static int findColumn(TableModel model, String name) { for (int i = 0; i < model.getColumnCount(); i++) { if (name.equals(model.getColumnName(i))) { return i; }//from w ww . j av a 2 s.c om } return -1; } }