From the documentation for JTable.
The JTable uses integers exclusively
to refer to both the rows and the
columns of the model that it displays.
The JTable simply takes a tabular
range of cells and uses
getValueAt(int, int) to retrieve the
values from the model during painting.
It is important to remember that the
column and row indexes returned by
various JTable methods are in terms of
the JTable (the view) and are not
necessarily the same indexes used by
the model.
By default, columns may be rearranged
in the JTable so that the view's
columns appear in a different order to
the columns in the model. This does
not affect the implementation of the
model at all: when the columns are
reordered, the JTable maintains the
new order of the columns internally
and converts its column indices before
querying the model.
So, when writing a TableModel, it is
not necessary to listen for column
reordering events as the model will be
queried in its own coordinate system
regardless of what is happening in the
view. In the examples area there is a
demonstration of a sorting algorithm
making use of exactly this technique
to interpose yet another coordinate
system where the order of the rows is
changed, rather than the order of the
columns.
Similarly when using the sorting and
filtering functionality provided by
RowSorter the underlying TableModel
does not need to know how to do
sorting, rather RowSorter will handle
it. Coordinate conversions will be
necessary when using the row based
methods of JTable with the underlying
TableModel. All of JTables row based
methods are in terms of the RowSorter,
which is not necessarily the same as
that of the underlying TableModel. For
example, the selection is always in
terms of JTable so that when using
RowSorter you will need to convert
using convertRowIndexToView or
convertRowIndexToModel. The following
shows how to convert coordinates from
JTable to that of the underlying
model:
And also, the javadoc for getValueAt:
public Object getValueAt(int row, int column)
Returns the cell value at row and
column.
Note: The column is specified in the
table view's display order, and not in
the TableModel's column order. This is
an important distinction because as
the user rearranges the columns in the
table, the column at a given index in
the view will change. Meanwhile the
user's actions never affect the
model's column ordering.
However, you can use a table wrapper as described in this other StackOverflow topic. Indeed the method you called doesnt exist on JTable and seems to have come from that topic already! Hope this helps.